Why is my ex ruining my reputation ?

He is putting me on blast on social media without saying my name treating me like I’m a criminal when I am not ever since the break up and this is affecting my future relationships leading to guys ghosting me and thinking bad about me when I am not. I never had guys leave my life like this affecting my chance of getting another boyfriend. Should I take legal action against him? Guys won’t stop ghosting me and ever since the break up with him a lot of guys have been blocking and ghosting me on social media thinking I do bad things when I don’t. What should I do about this?