when I was 18 I got dumped HORRIFICALLY and I moved to New York for a summer because I couldn't bear to be in London where I might bump into her. The relationship was super codependent so I hadn't been by myself basically since I was 15. I was terrified of being alone because I didn't want to be sad, and I wouldn't have anything to distract me, but it ended up turning me into someone who values my alone time so much more now.
You are supposed to go for walks in nature I think but I would spend days of my life just walking up and down Manhattan. For post-breakup solitude training you should do both:
1. Headphones walking in city. Pick whatever song you need to hear, but something that has big emotional payoff, and lipsync very obviously. No one walking past you will notice and it feels illicit and liberating. Practice your aloneness by going into shops (you don't have to spend any money) and interacting with people by yourself.
2. Nature walking by yourself. Rawdog it - no headphones, map, whatever. Just roam. I do this on the heath when I have Big Thinking to do. It's nowhere near as boring as you're worried it might be because you are busy trying to calm your anxiety and then your mind is able to wander to interesting thoughts.
I think it's the best way to practice being alone. Just roam!