Was I right to block a guy who used me and ignored me?

This guy was texting me for over a month giving me high hopes of a relationship with him planning things etc.
but when I decided to give in and do the deed with him he finished with me and ghosted me.
As much as I begged and pleaded with him.
I just had to block him as I felt crap and for my mental health just wanted him gone if he’s gunna ignore my feelings and everything
Was I right to block a guy who used me and ignored me?
Post Opinion