When I was 9 years old(not yet adolescent) I uttered blasphemous words for Allah SWT and His Prophet SAW in anger, but I didn't know that it would take me out of the fold of Islam and continued to practice Islam later and read the Shahadah several times but didn't repent when I reached puberty I thought that because I wasn't an adolescent I wouldn't be held accountable for what I uttered,so I started praying and fasting as obligated but suddenly I thought I should research a little and I found out that Scholars differed upon the issue, now I have repented and renewed my faith, will all the good deeds I did uptil now will go void?
All perfect praise be to Allah, The Lord of the Worlds. I testify that there is none worthy of worship except Allah, and that Muhammad is His slave and Messenger.
Your good deeds are not invalidated, Allah willing. These thoughts are nothing but whispers, so we advise you to avoid them and not give any attention to them. A boy is not religiously responsible or accountable for religious assignments and his apostasy is not valid at all according to the view of many scholars.
This is if we assume that that expression has resulted in apostasy. Moreover, if a person who is accountable for religious assignments has apostatized and then he prays, then he is judged to be a Muslim according to the view of many scholars.
Allah Knows best.
You can search for fatwa through many choices