If u are suffering the case of vomiting yellow fluid, you should think about ur bile’s condition… Why? Because throwing up bile might be called as yellow bile or yellow vomit. This is one of the popular issues that everyone meets once. Most people suffer from vomiting bile in the morning or without reason. When the color of your vomit is greenish yellow, then it can be throwing up yellow bile. Gastric juices (bile) never appear in the stomach in the normal process. However, when something happens in the digestive system, the pyloric sphincter will open abnormally. After that, food goes from the small intestine mix with food from the stomach that leads to a gastric fluid typically yellow. It can be caused by various reasons, the most popular is ur empty stomach. When your stomach is empty, there is only bile in there. Thus it can make you feel nausea and lead to throwing up bile. This is explaining that the vomit bile is greenish yellow. You should consume enough food for the body to avoid hunger or starvation such a long time (reference: https://carekees.com/throwing-up-bile/)
The following cause is acid reflux from the stomach into the esophagus when the acid comes backward. However, bile reflux is different with throwing up stomach acid. This situation occurs when there is too much bile in the stomach, and the body wants to kick it out then it leads to throwing up yellow liquid (throwing up bile) (https://www.ncbi.nlm.nih.gov/pubmedhealth/PMHT0022186/)
Other sources: