It is called sleep hygiene and there are many different aspects and rules to this that you can cater to your preference. For example I do use a screen in bed but I have an extreme blue screen filter and also block social media apps- I just listen to stuff or maybe read.
If you want to escape this loop, you need a strong rule against any screens in , at minimum, your bed, but ideally the entire bedroom.
This way the only association your brain has to your bed is sleeping, making it much easier to just sleep when you get into bed.
Music / podcasts / audiobooks are also highly unadvisable.
It is called sleep hygiene and there are many different aspects and rules to this that you can cater to your preference. For example I do use a screen in bed but I have an extreme blue screen filter and also block social media apps- I just listen to stuff or maybe read.