should i block him?

ive always liked this one guy from my school since we were in elementary, and last year i finally got the chance to talk to him (we were seniors). though i thought i got everything ive ever wanted, i noticed some things that he would do. for example, he would talk to me for a few weeks, then ghost me for a week or two and then it would be like that for like a year. he also cusses at me a lot which i don’t really mind people cussing but like don’t do it at me yk 😭. i didn’t really think anything of it cause i was already used to it and would think oh he’s just gonna come back but i was talking to my friends about it and they think i should just leave and block him(they also hate him lol). though idk i can, i think about it a lot but my heart does not wanna do it. what should i do?