I need explanation

so i took a pregnancy test the first thing in the morning it came out positive then i took another one came

out negative so i then waited until my period came and it did.. is that okay ? or not ? i need explanation