As someone who officiated funerals here are my two cents: if you were really close to the deceased [best friend, relative, lifelong coworker], flowers can be a nice gesture. If you weren’t close enough to be in the will, donate to a cause they cared about and let the family know how much you miss/loved them in a letter or in person. And be sure to tell the good stories about them to people grieving, because those are priceless.