second idea of a pin lock on mobo bios is also possible.
what is make and model on the mobo?
Asus Prime Z270-AR
Make sure the battery is good and you can use a volt meter to see if the pins off the batter holder are making good contact (ie have power from battery...do this no plugged in...i think its 3.3V but whatever V the battery should be).
Looking at the manual.
Check the RTC clear jumper. Make sure there is no jumper on the two pins. Its on page 1-11 of the manual. This is used to clear and reset the bios. The normal procedure is to remove all power and short the pins for a few seconds. to blank the bios settings. Then remove the short and repower the system. Check if this is jumpered if it is remove it and it may take a bit but the bios should allow you to program it and save it with a good battery.
Thats the easy stuff.