Use your bed only for sleep. No screens for a few hours before bed. Milk before bed. Reading or audio books are a great way to settle your mind.
If you aren’t asleep after 30 or so minutes get up and do something chilled for a little bit. Laying there getting pissed you aren’t asleep doesn’t help.
Stick to a sleep / wake schedule. I’ve found getting up early and consistently much more effective for sorting out my sleep.
I got into programming when my disabilities hit as a teenager.
So fucking lucky I did as I now get paid decent money to sit in my pjs in bed at a computer.