If he vomits unintentionally and he is overwhelmed by it, it doesn’t affect his fasting. Only when he deliberately vomits that it nullifies his fasting.
The Prophet (salla Allahu alahi wa sallam) said: “The one who cannot help vomiting does not have to make up the fast, but the one who vomits deliberately has to make it up.” Classed as saheeh by al-Albaani in Saheeh al-Tirmidhi.
And Allah knows best