Reset iPhone without Apple ID password

Hello.
I need to rest my iPhone X but I've forgotten my Apple ID password and I can't recover it.
Is it okay to Reset All Settings from General=> Rest? And then setup a new Apple ID?
Nope. In order to change out IDs you have to log out of one and into the other. If I remember correctly you have to log out of iCloud to wipe your phone as well. How did you manage to forget your Apple ID?
I came across these two articles from Apple's support site:

https://support.apple.com/en-us/HT201487

https://support.apple.com/en-us/HT204921

There are ways to change or recover your password, provided you are the account owner. Otherwise, no, there's no way.
Hello and welcome to iMore! I’m sorry you’re having difficulties. Apple Support should be able to help you.

Original thread: https://forums.imore.com/threads/reset-iphone-without-apple-id-password.431919/