If your family doesn't write/pay for an obituary then you won't get one, as MartyByrde said.
What you can try, is to mask your identity as much as possible so that you are ruled identifiable amd put into an Unidentified Deaths/Persons database like NAMUS. This requires a lot of knowledge and preparation. So going somewhere far where you have no connections, not having DNA or fingerprints anywhere (so you cannot have been arrested or done 23AndMe), and getting rid of all ID and other documentation tracing to you. This is usually easiest when you are homeless and have been homeless for a long time.
I have a relative who is estranged from the rest of us, they are chronically homeless, an addict, and lost all their ID years ago. We hadn't spoken to them in years, once they got found passed out in the woods by the cops. No one could find their next of kin for about two years. They survived all this and lived in a nursing home before "suddenly" remembering someone's contact info and calling them asking to be let out.
Otherwise, it's gonna be really easy to find your family. If you went to the hospital and named someone as next-of-kin or emergency contact, they can find that. Cops can do a basic address search on you (if it shows on your credit report then the cops have it too) and find out previous addresses, who lives there now, and deduce that if someone with the same last name is there then they probably know you. Then asking at work, the neighbors, the landlord, etc. Chances are the ones who will be the most nosey are funeral homes and estate lawyers looking to cash in on a bereaved family, hospitals/cops usually decide to give up quick if you live far enough and don't die by suspicious means.