What to do when I don't have right iCloud account restart iPhone?

So apparently I'm not typing the right Apple ID account but I only have two accounts that would've been used. And neither of them work. Is there anyway to restart my phone without the Apple ID account (bc it won't let me go further in my phone without the accounts to restart it) or would I have to go to the Apple Store so they can restart my phone to factory setting like brand new? Also it said I used some account that began with a "g" but I don't own any account with a "g"

The apple store won't do anything, thats your responsibility to know your password. You can reset your password on the apple site if you don't remember it.

It seems you are not the original owner of the phone.
This is the iPhone activation lock and can only be removed by the original owner.
At one time someone else used the phone, and it is their Apple ID/email showing up.
If you bought the phone used, please contact the previous owner or return the phone for a refund.