Kid throw up

Can kids throw up from a cough and mucus?

My 3 year old just threw up she has a little cough and mucus. Idk if it could be the stomach bug because she barely threw up anything she just threw up the medicine I gave her and a bit of food but she didn't throw up much. And she has a fever of 99.4 I just want to know if it could be cause of her cold or a stomach bug because I have 2 other kids and if it's a stomach bug so I can keep her away from them