I have a light head felt that walls moved with me and then I threw too much what could be the reason it happened 2 times so far

May have Gastroenter. You mean to say you felt lightheaded, moved your bowels and than you vomited you may have gastroenteritis, you should consult your doctor to confirm that or if it is something else drink clear liquids containing electrolytes to prevent dehydration and if you keep vomiting go to er as you might need IV fluids etc.