why do I feel so good after accomplishing something?

I feel so good when I cross something off my task list or accomplish one of my goals. I’m assuming this is because I instantly create a thought like “I am getting closer to my big goal” And then that thought is creating the good feeling ?