This sounds weird but try doing maths problems in your head that get progressively harder. Or require more of your memory. It may help stop your mind wandering all over the place and focuses it until it gets too tired and you fall asleep. It sounds counterintuitive but it might help.
It’s a form of mindful diversion.
It also helps if you do the same maths problem every night or at least every night you have trouble sleeping. It then trains your brain. It can help people that struggle with doing meditation. 🫂