Create a sleep/bedtime routine. Shut off ALL electronics an hour before bedtime... ALL. Electronics of today mess with the brain and doesn't allow it to wind down (like the old days

).
Read or do something peaceful. Make a list of things to do tomorrow (this helps keep them "out of your head" trying to remember them or to worry about them) Don't worry about anything because it's nighttime and you can't do anything about them anyway right 'now'.
Don't eat several hours before bedtime, and yes stay away from caffeinated beverages... that includes tea, soda and coffee. Don't eat sugary snacks as that will give you a low but then bounce you back up...and down again...
If you find yourself waking, try not to open your eyes or turn on a light or get up at first... think about going back to sleep...how comfortable the bed feels...
but if you cannot fall back asleep don't beat yourself up over it (I NEED to sleep, why can't I sleep, I hate this... talk)... get up, read (no electronics! that includes music and tv)... maybe sip some warm milk or non caf herbal warm drink... and after a bit (15-30 minutes_) go back to bed again.
Keep working on your routine...you may need more than an hour to begin it... teaching your body to get ready for sleep. If a shower or bath enlivens you, don't do this at night.
It takes time to change habits... but what is your alternative to no sleep??? So continue this and probably within the month you will have a good routine and your sleep will be good.
PS depression can cause issues too...which is why some doctors prescribe short-term sleep meds... usually a month...to get your body back into the routine of sleep.
Be sure to get at least 15 minutes A DAY of sunshine. Otherwise your circadian rhythm will be off and this will also upset your sleep time.