When we feel something pleasurable, our brain releases dopamine. This dopamine hit leaves us feeling you euphoric. It leaves us feeling pleasure and joy and satisfaction.
And every time you masturbated to pornography, your brain released dopamine. And the more you did it, the more dopamine was released.