Hmm I must be in the minority here, because I would say don't stimulate your brain with tech or even by reading a book. For me it just keeps me awake longer.
If it's anxiety that's keeping you awake, then your heart rate will likely be high and that needs to come down before your body thinks it's safe to drift off. Afterall, anxiety is actually supposed to keep us safe. To get our adrenaline pumping incase we need to fight or flight, so firstly you need to acknowledge that you're anxious.
Focus on breathing. Nothing else. I don't mean those biiiiig deep breaths that make you feel dizzy and sick. You need to breathe out for longer than you breathe in, but gently and calmly. As you breathe out, imagine that your anxiety is slowly being exhaled from your body.
I downloaded a heart rate app and find if it's above 85/90 bpm, I struggle to relax and drift off. I don't use it so much now, as I found it was too easy to obsess over, but it helped me understand how important heart rate is when trying to sleep.
Another bit of advice I'd give is, and this might sound silly, but don't worry about it. Don't count down the minutes, the hours etc. You need to get to a point where you genuinely aren't stressing about how much sleep you will or won't get.
It's about breaking that cycle.