Used MacBook Pro won't let me Sign Out and Sign In with my own ID
I bought this MacBook Pro, and I've been trying to update apps, but it's still tied to the previous owner's Apple ID. I tried to Sign Out, but it still asks me for the password to turn off the Find my Mac. I obviously don't have the password, therefore can't enter my own ID. I've read online that I need to reset the computer to factory settings, and have it as my own from scratch, but I'm not even sure how to do that. Is there any way I can change the ID to mine without erasing everything?
MacBook Pro (M2 Pro, 2023)