To get your ex back, you need to be nicer than ever, be a confident person, put down your ego, think like a mature person, work on your physique, and give him a short space.
Please note, when you start working on yourself after the breakup, he will think you have changed and become better than before. It will make him think about you again.
Follow the guide on how to win him back after a breakup for better guidance