I'm trying to ease all contents and setting from my iPhone 7 and it's asking for a password but I don't have a password

Ok so I recently got an iPhone 7 and when I opened it up it was a clean slate nothing on it. However when I tried to restore my old phone's data I restored the wrong phone. I tried to go into setting and ease all contents but it asked for a password that I didn't put into my phone and didn't create. I have no clue what to do.

You haven't asked a question.

The password is likely the same as you would use in the app store when adding an app.

If it's actually still linked to the previous owners account, all you can do is ask them to unlock it.

Give them the details from here, they can erase and unlink it:

If you mean a PIN code (4/6 numbers) rather than a password, then do a DFU restore - that will do a full reinstall of the operating system (using itunes) and leave it in the "as new" condition again, ready for use or restoring a backup.

That will not unlink it from any apple "icloud" account, only the account owner can do that - the ownership data is saved on apple's servers not just the phone & the two must match.