First definitely see a doctor. Lots of conditions like sleep apnea or periodic leg movements can prevent deep sleep.
For me, I have found that anxiety was the root cause of not getting enough deep sleep. My life is so full with kids, work, etc that I can feel like I’m in a constant state of vigilance. What’s helped me:
- Journaling before bed, write down all my worries and cares. Feel all the bottled up feels, etc. also any TODOs. Just get it all out of your head
- talking to a loved one a lot about the same. Just getting it all off my chest
- meditation
- taking breaks from everything for solitude and self care
- exercise
- disconnecting from electronics and reading a relaxing paper book an hour before bed
I’d recommend the book The Sleep Solution by Chris Winter.