I am a 16 year old teenager, I actually recently started studying a lot about Islam and started praying salah. But ever since I started doing this, some really bad thoughts about Islam started coming to my mind which never happened before. Sometimes I get so bad thoughts about Islam and my mind just for no reason starts give me thought about other religions so I wanted is it common for something like this to happen to a person who recently started studying Islam and praying salah and I also wanted to know will I be accountable for this bad thoughts if I don't act upon them or believe in them?
You can say that it is common to get bad thoughts because shaitan(devil) is always there to get you away from the path of Allah. He tries his best so that you give up reading and learning more of islam. One of our scholars said that if you see that you got bad thoughts about Allah, it is a sign of Imaan in your heart because bad people do not think about islam or Allah, so Shaitan(devil) does not have to keep them away from the right path. And that's why when you are trying to stay in islam, shaitan(devil) is always come up with new bad thoughts and ideas to break your Imaan down.
Al Hassan Al Basri said that:
“When Satan gives up on leading you astray, then all he’s reduced to is a bunch of whispers. And as long as you let it stay there and you don’t allow it to penetrate your actions, don’t think Allah is going to punish you for your thoughts.”
Al-Bukhaari (6491) and Muslim (131) narrated from Ibn ‘Abbaas (may Allah be pleased with him) that the Prophet (blessings and peace of Allah be upon him) said, relating from his Lord, may He be glorified and exalted:
“Allah decreed good deeds and bad deeds, then He explained that. Whoever thinks of doing a good deed then does not do it, Allah will write it down as one complete good deed. If he thinks of doing a good deed and then does it, Allah [may He be glorified and exalted] will write it down between ten and seven hundred fold, or many more. If he thinks of doing a bad deed then he does not do it, Allah will write it down as one complete good deed, and if he thinks of it then does it, Allah will write it down as one bad deed.”
Al-Bukhaari (5269) and Muslim (127) also narrated from Abu Hurayrah (may Allah be pleased with him), that the Prophet (blessings and peace of Allah be upon him) said:
“Allah, may He be glorified and exalted, will forgive my ummah for whatever crosses their minds so long as they do not act upon it or speak of it.”
So we learn from here that you will not be accountable for these thoughts, but trying best to get rid of these thoughts must need to stay in this path.
Here are some references which may help you get rid of this problem: