Thoughts?

So I am 17 not sexually active since idk I don't want to be non virgin in high school my main goal ... But the point is ... I haven't had my period in months and when I do it happens out I the blue it sometimes disappears for more months and sometimes only once it disappeared for almost a year my dr gave me birth control and it came back soon idk after that it disappeared and finally got back on my period barely on two days ago I believe and it seems normal but what or why is it that this happens I really hate it since it scares me sometimes