The difference between doubt and waswasah
Question

How can I determine whether what comes to mind when doing an act of worship is uncertainty or waswasah [persistent intrusive thoughts]?
Praise be to Allah.Waswasah is a great deal of uncertainty, or uncertainty without any evidence or reason for it.
If someone experiences a great deal of uncertainty, then he is suffering from waswasah, and he should not act upon his uncertainty, in contrast with the one to whom that does not happen often; if the latter is uncertain as to whether he omitted an essential part of his wudoo’ or prayer, for example, he should do it.
Al-Kaasaani (may Allah have mercy on him) said, quoting from Muhammad ibn al-Hasan (may Allah have mercy on him): If someone is uncertain about some of his wudoo’, and his initial uncertainty has to do with whether he washed a particular part or not, he should wash the part he is not sure about, because he is certain that that part needed to be purified, but then he was not sure whether he had washed it.
What is meant by “his initial uncertainty has to do with whether he washed a particular part or not” is that uncertainty in such cases does not become a habit, not that he never experiences this problem at all. But if that happens to him a great deal, he should not pay any attention to it, because that is waswasah, and the way to deal with that is to put a stop to it (and not pay attention to it), because if he allows himself to be distracted by it, it will lead to him not having any time to perform the prayer, and that is not permissible.
End quote from Badaa’i‘ as-Sanaa’i‘ (1/33).
In al-Mawsoo‘ah al-Fiqhiyyah (14/233) it says: The one who is affected by waswasah is the one who is uncertain about an act of worship to the extent that he begins to doubt whether he did something when he has already done it. In principle, uncertainty means that he has to go back and do what he thought he omitted, such as one who lifts his head and is not sure whether he bowed or not; in that case, he should bow, because the basic principle is that he did not do what he is unsure as to whether he did it or not, so he should proceed on the basis of what is certain. By the same token, the one who is not sure whether he prayed three or four rak‘ahs should assume that it is three and do another rak‘ah, then do the prostration of forgetfulness.
But if he is affected by waswasah, he should not pay attention to it, because that will cause him hardship, and hardship is something to be avoided, according to Islamic teachings. Rather he should continue on the basis of what he thinks most likely, so as to make things easy for him and put a stop to the waswasah. End quote.
Ibn Hajar al-Makki said: There is a differentiation between waswasah and uncertainty. Uncertainty has a reason, such as not accepting a garment from one who is known for not being careful to avoid impurities (najaasah), and not praying behind someone who is known to be careless about removing impurities from his clothing, because even though in principle things are pure, in such cases that is contradicted by the likelihood of their being impure, in which case caution is required. That is in contrast to waswasah, where the affected individual deems something to be impure for no good reason, because in principle things are assumed to be pure, such as when he wants to wash a new garment or a garment that he bought, in order to be on the safe side. That is an innovation, as was clearly stated by an-Nawawi in Sharh al-Muhadhdhab. In that case, it is prudent to avoid that cautious approach. That is because the one who is affected by waswasah assumes that things that never happened did happen, such as imagining that there is an impurity on his garment, then deciding that it is present without any clear proof.
End quote from al-Fataawa al-Fiqhiyyah al-Kubra (1/220).
From this it is clear that waswasah is of three types:

Uncertainty without any reason for doubt.
Assuming something that never happened, then deciding that it has happened. This is connected to the first type
When there is a great deal of uncertainty and it becomes second nature.

Based on that, if your uncertainty when doing the act of worship is not based on any proof, then it is waswasah. If you experience a great deal of uncertainty, then it is waswasah.
And Allah knows best.