İs bath or ghusl neccesary after masturbation?

Updates
+1 y
I'm 1 years old and I'm Muslim. I have been praying 5 times a day for about 1 and a half years, However, I masturbate. I tried to completly give up about 2 weeks ago and i managed to do so for 1 week, but I keep doing it again. I did not know it was haram and I also didn't know that you had to perform ghusl (bath) afterwards, I have now decided that I will stay as far away from it. So my question is: Have my prayers been recognized for the past one and a half years?
Updates
+1 y
İ am 18 year old
İs bath or ghusl neccesary after masturbation?
Post Opinion