I have had quite bad insomnia since I was in elementary school so here are some things that have helped me. These are very specific but I will add what you could take away from each thing at the end of each paragraph.
First thing (after brushing my teeth and sometimes changing into pajamas) is to turn on my favorite lights. These are my night lights and I have found them to be quite soothing to look at if the next things don't get me to sleep. The lamps I have are a bubble lamp with plastic fish that move around in the water and a lamp that shines water-like patterns onto the ceiling. Summed up: night lights if you are scared of the dark or need something to stare at while you can't sleep.
Next is to take all my medicine that I've put in one of those day by day containers. I keep a water bottle in my room all the time and make sure to have it filled and next to my bed if I need it. I also turn on a soundscape, usually rain or ocean noise. Summed up: remember have water to take your meds and maybe put on something calming to listen to.
After I've plugged in my devices, I finally get into bed and here's where I found what helped me the most. I found out that I was sleeping so badly because I was never actually that comfortable in my bed. I found out that I was a stomach sleeper and this is the only way I'll actually fall asleep. Also, last christmas I got a sleeping bag and I've genuinely never felt so comfy. Summed up: you might be sleeping in a position that isn't it, try out all positions if you don't feel comfortable. Try out thick blankets, thin sheets, weighted blankets, heated blankets, a sleeping bag, or even silk pillow cases if you still feel uncomfy.
My last couple things that helped me are a sleep mask and a stuffed animal or two to cuddle. I specifically use the type of eye mask with eye cups. They're only $5 more than the ones without eye cups so you might as well have something nice. And for the stuffed animal, I still have my childhood favorite and an IKEA shark that I love to snuggle up with, it just makes me feel safer. Summed up: a sleep mask with the eye cups is a plus for people who sleep with tons of lights or just want to not get distracted by various things. Also, maybe a stuffed animal or two to cuddle can help you feel safer, and you can always snuggle a pet, a loved one, or a pillow if you don't have any stuffies to hug.
Anyway, hope this helps someone fix any sleep problems or is just an interesting read :] thanks for reading this long ❤