Why is it so hard getting back on track after relapsing

I was able to do a 20 Day streak without fapping. On day 20, I ended up linking a girl and but didnt do anything with her. I got home and that night I was so horny I relapsed. The day after I told myself to not fap today because ill go back into the addiction. At night, when I went to sleep I took a melatonin to make it easier to fall asleep. I tried to go to sleep for about an hour but i had this huge urge to fap that didnt let me sleep. After count’ess minutes being in my bed with my penis rock hard I just decided to fap because I have school tomorrow and I cant stay up all night.

Does this happen to you guys? How can I fight those huge urges?