Regular exercise, sleep mask, earplugs, no screens 1 hr before bed (just read a book), no eating 3 hrs before bed, no spicy food, caffeine, or alcohol 8 hrs before bed, in bed at the same time every night, dark blinds, blue light filtering glasses, flux/night mode on your computer and phone, pee right before getting into bed, make sure you have a quality bed+pillow+sheets+comforter that matches your weight and sleep style, meditate earlier in the day so you can deal with the busy thoughts ahead of time. You can try melotonin but I built up a tolerance very quickly.
If all that doesn't work, trazodone. Life saver.
Maybe you can tell, but I've been fighting for good sleep for >10 years.