Aoa, I am a 16 year old boy and for the past 2 years I had been addicted to masturbation and pornography but at first I didn't know it was haram, when I got to know I tried to reduce it and repent but everytime I would fail,last year I reduced it that I used to masturbate once a week, Then this year I made a promise to myself and Allah that I will try to not do it again and repented truly, Alhamdullilah I was able to quit it and didn't masturbate for 5 months but yesterday I accidentally opened adult content and semen came out( I didn't use my hand), I am so ashamed cuz I was able to control for such a long time and ik Allah doesn't forgive if u keep on doing it but this happened after many months and I had no intention to sin and feel very bad and I'm trying to repent will Allah forgive me?
"ik Allah doesn’t forgive if u keep on doing it". This is utterly false. Allah is the most forgiving, he forgives ALL SINS before the Sun rises from the west.
ALLAH WILL FORGIVE YOU., even if you sin 1 million times, as long as you repent sincerely.
To help with your case, fast (because fasting reduces sexual desires) or marry to a woman (to fulfill your sexual desires in a halal way).