Metformin

Hey y'all! So. I went to the gyno Wednesday and had a vaginal ultrasound and was put on metformin.(they found a 3cm cyst on my right ovary and we are TTC)  My last period was October 31 but they're super irregular. Yesterday I started spotting lightly and today it's been heavier. Could the spotting be from the ultrasound or from the metformin? New to all this so any advice or info is appreciated!!