Confused!!

Had dark red bleeding 3 weeks ago for 7 days just like my normal period, woke up this morning not feeling to great so decided to take a test and a line showed up but I’ve not tried to baby make since I came off my period… any reasons as to why I had bleeding and now showing a positive line