السلام عليكم، أحسن الله إليكم A brother was taking his shahada and he questioned midway and after his shahada in his head if it was valid, his shahada fine? And does the ruling change if it’s a brother returning to the deen?

Ustadh AbdulAziz al-Haqqan
It seems that this is waswa and it does not affect anything, however, if you need medical help then do not hesitate to seek it.