In what context?
How to factory reset your iPhone, iPad, or iPod touch - https://support.apple.com/108931
What to do before you sell, give away, or trade in your iPhone or iPad
https://support.apple.com/109511
You do indeed mean password and not passcode?
If the iPhone using your current account?
If you have changed your password since the device was last used, can the device now connect to the Internet to learn about the new password? If not, it may be expecting some earlier password you used.
Apple can completely reset a device if a person can provide sufficient evidence of valid ownership. Read the requirements and steps for an Activation Lock support request at: https://al-support.apple.com/#/additional-support and links at the bottom right for the type of service requested. Apple says they “may” require "proof of purchase documentation” and that you need “proof of ownership documentation”, but does not detail what currently constitutes proof other than it “must include the product serial number, IMEI or MEID.” User reports on this community indicate that typically Apple will absolutely require, and ONLY accept, an original receipt issued by Apple or an Apple Authorized Reseller. Presumably this is the only kind Apple can authenticate against fraud since Apple is not involved in third party sales. Apple recommends that you "Keep your receipt after you buy an Apple device" --> https://support.apple.com/HT202711