Iphone password says incorrect but I know it's right
I have an iPhone 8, and recently a message popped up saying "incorrect password" when I have been using the same password for as long as I've had the phone. About a week ago I had to turn passcode off for a scene in class I was doing. When I went to put passcode back on I accidentally put in a really old password, but I immediately changed it to the one I normally use. This morning I was on my phone without any issues, Then about an hour ago my phone asked for my password to be put in (after I was using my thumbprint all day). I then put in my passcode and it was saying I was wrong, I then tried to put in the old password and nothing worked and it was locked for 15 minuets. Next, I turned off my phone and turned it back on. it still said "iPhone locked for 15 minuets". I looked this up and nothing helped me at all. I don't want to have to erase all data and pictures I have, to unlock a phone I know the password to. Also, last night my phone died and when it asked for the password after it charged back up it worked. So I'm confused why it is doing this now.
iPhone 8