It is increasingly popular to ask for donations to charity instead of funeral flowers.
Yes, you can have a cash collection at the funeral service. Your funeral director will be pleased to organise this for you and send the money to your chosen charity. There’s unlikely to be a separate charge for this.
But you will almost certainly raise much more money, and therefore do more good, if you ask people to contribute through a fundraising website. It’s far less painful for them to part with virtual money than five pound notes.