Searched and I didn’t see a post like this so wanted to offer my solution for earbuds that don’t fit well and fall out or just fit too loosely. I use a small amount of white sticky tack (sometimes called mounting putty, fun-tac, etc.). Pinch off a pea size roll into ball and put on ear bud where it will touch both the earbud and your ear and then press against ear. They stay put for me until I take them out.
It is non-toxic and you can reuse it over and over. you don’t really need that much. comes in a lot of colors but I like white the best because when I used the blue it was visible if I had not yet cleaned it off after use.
Another thing that also works are those little clear tacking things put into packages. And I think the mold your own ear protection substance should work too.
YMMV but it works excellent for me. also, been doing it for years and I still have my original ears and they’re fine.
P.S. 1st post!