WTF period starts then stops

No period for 5 months then period for 2 months then no period for a month then some spotting a month later. Might've been period but took pregnancy test and it was negative