Don't use your phone at least 1 hour or 30 minutes before you go to sleep, because when you are on your phone your brain gets so many stimuli (in social media for example in 30 minutes you feel a lot of emotions such as happiness, sadness, anger, etc). So it's hard to sleep well with all these stimuli that your brain keeps processing. Instead of using your phone until the last minute, do something that relaxes you. Read a book, write how your day was, plan the next day, drink tea, go talk with your loved ones, play with your pet or something like that. Just pick one and do it. That's at least what I think and works for me. It's not that we can do it everyday, but we can try whenever possible.
I think it's better to say "write about your day" instead of "write how your day was", but I didn't change it in the text just for keeping it genuine :)) .