I am a HORRIBLE insomniac, officially diagnosed and everything, so I got sooo many doctor recommended things you can try which have worked for me (obvi I'm on my computer late at night so I'm already ignoring some of these rules, but eh) but I'll just put down a few.
-no more sleeping in. Wake up at the same time every day, so if you wake up at 6:30 for work, that means you wake up at 6:30 on the weekends. It sucks, but it...it absolutely fixes your sleep cycle (unless you have a 26-hour rhythm, which is a whole different problem)
-diet fixes: stop eating anything with caffeine in it until your sleep improves, this includes most soda, chocolate (I know!), caffeinated tea, coffee obviously. Also, avoid alcohol, especially at night, because while it will make you sleepy, you will wake up a few hours later--it's really bad for sustained sleep. Smoking is also a thing that will mess with your sleep. I have no idea about vaping though, you'd have to ask your doctor about that if that's a thing you're doing because it might be keeping you up.
-Along with this, your eating cycle tells your body when to stop and go to bed. So if you eat late at night, you will be awake late at night. This depends on if you CAN do this (like ask a doctor about this one if you're unsure), but if I'm having a hard time sleeping, I have to adjust my schedule so I have dinner at 5:30PM and I stop drinking anything (including even water) at 7:30PM. If I get hungry, I can have like a tiny snack of like crackers or something but you need to tell your body it can do nothing else but sleep. You have to be it's boss.
-practice meditating every day for 10-20 minutes with a guided meditation via youtube or something like that. Sounds weird, but you have to learn how to turn off your thoughts. When we're in stressful situations and pandemics, we have a tendency to think too much. So just think of it as a workout, so when you get to bed, you can start your meditation without needing to have youtube on.
-White noise--I need to sleep in complete silence, but white noise helps a lot of people. Either a fan, or a white noise machine, or something like that. Just avoid anything with lights.
-sleep in total darkness. Avoid blue lights. This also means that if your computer must be in your bedroom, you might need to unplug the thing
-Don't keep a clock in your room. When you stress about how long it takes to go to sleep you don't go to sleep. I have my phone charging on the opposite side of my room and it's upside down. Just let it go and go back to bed.
-go outside every morning, first thing you do--it sets your body back into a circadian rhythm to feel sunlight.
-Exercise is super good to encourage sleeping, especially cardio, but don't do it too late at night or it will keep you up.
-don't take naps. Save that tired for the evening.
And like there's oodles more of things that actually work, but again, I have REALLY bad insomnia and so you probably would only need to do like...1 thing and you'd probably be tired as hell.
And a side note--melatonin does work, but it takes a few weeks of taking it every evening to kick in. And, once it does, you will find it will...stop working once your body gets used to it. True insomniacs have to avoid taking sleep meds because they don't work, but just be aware that melatonin is meant to be temporary, and while it's a supplament and has no negative effects that we know of, it is basically a placebo after a few months, and so you'll have to stop using it a few weeks to reset your system before going back on it.