i went through a horrifically bad, messy, painful breakup late 2022/early last year and i still think about it often, but what helped me the most was
1. blocking them and COMMITTING to not checking their social medias (including stuff like Spotify). For me I focused most on the awful sinking feeling I'd get when I check, and I have slowly over the past year been able to ween off of checking it
2. truly and genuinely spend as much time with your friends or occupied as possible. when you're not with your friends, spend your time doing a hobby you love - especially a hobby that can cause some sort of material change, whatever that is
it also helps to get a haircut or make some dramatic change to your appearance/surroundings. anything fresh and new!!!!!!!!!
also do not expect to feel better immediately, or even with weeks, months, a year....it takes a very long time to get over relationship trauma and you shouldn't beat yourself up for not being over it!!