Does vomiting during the day in Ramadan break the fast?
Intentional vomiting is one of the nullifiers of fasting; whoever vomits deliberately breaks their fast.
However, if vomiting occurs involuntarily, the fast remains valid as long as nothing returns to the body cavity (jauf). If anything is swallowed back, the fast is invalidated.
The Prophet ﷺ said: "Whoever is overcome by vomiting does not have to make up the fast, but whoever induces vomiting deliberately must make it up." [Narrated by Abu Dawood and At-Tirmidhi]
Does undergoing an endoscopy during the day in Ramadan affect the validity of fasting?
Undergoing an endoscopic procedure during the day in Ramadan—whether through the mouth, nose, front private part, or back private part—invalidates the fast.
Whoever undergoes such a procedure must refrain from eating and drinking for the rest of the day out of respect for the sacred month and make up for that day after Ramadan.
What is the ruling on someone who eats or drinks thinking that the sun has set, then realizes that it has not yet set?
Whoever eats or drinks believing that the sun has set, then later discovers that it has not yet set, their fast is invalid, and they must make up that day after Ramadan. It is not permissible to break the fast before confirming sunset—either by seeing it, through personal reasoning, or by relying on the statement of someone trustworthy in their religious commitment.
How should I deal with the whispers of the devil with regard to ablution and purity?
Whispers in ablution are from the devil, and so you should take refuge in Allah from the devil`s evil suggestions that aim to distort the religion. Thus, once an organ is completely pure, don`t question its purity since having whispers doesn`t mean that the purity is invalid as it has already been established.