I knew I was wearing something that was Najis but didn’t realize the impurity was transferring to my body when I washed myself in the bathroom. I changed my clothes when I prayed but did not realize my body was Najis while praying. Is my prayer valid?
Doubting whether the Najasat has transferred to your body or cloth or not, does not make your body or cloth Najis. You can consider everything as Tahir unless and until you know for sure that it is Najis.
'If you are sure that you performed a Prayer while your body or cloth were Najis, then you need to be Tahir and perform that Prayer again.
Wassalam.