What should I do about being mad at my parents for punishing me because of an extracurricular?
Why did your parents punish you because of an extracurricular?
Because last time they punished me in the same manner I was in a bad mood
Your parents should not be punishing you for a course you are taking, it's your life and your choice.  If your parents are trying to control your life, you should tell them to stop instead of letting them get you mad.
I'm an adult and they are treating me like a child.
Since you are an adult, it makes sense that you would not want your parents punishing you over a choice that you've made. You should talk to your parents about how you feel, Holding the anger inside will only bring you stress.