The Prophet ﷺ said: if one has a sudden attack of vomiting while one is fasting, no atonement is required of him, but if he vomits intentionally he must make atonement. (Using translation from Abū Dāʾūd 2380)
أَنْ يَقْضِيَ وَإِنْ كَانَ ذَرَعَهُ الْقَيْءُ وَهُوَ صَائِمٌ فَلَيْسَ عَلَيْهِ الْقَضَاءُ»