Click on this link to read what to do "If you forgot your Apple ID [Account] password" --> https://support.apple.com/HT201487
or go directly to this link --> http://iforgot.apple.com/
Also read about "What to do after [or before] you change your Apple ID email address or password" --> https://support.apple.com/HT204071
What to do before selling or giving away your iPhone, iPad, or iPod touch "Use these steps to remove your personal information from a device, even if you don't have it anymore." Click here --> https://support.apple.com/HT201351
[or if you received one that had not been erased]
If you still need help:
Contact Apple for help with Apple ID account security "This article provides country-specific Apple Support contact information for customers seeking help with their Apple ID password or other security-related issues." --> https://support.apple.com/HT204169
Learn which size SIM card your iPhone or iPad uses - Apple Support - https://support.apple.com/HT202645
Remove or switch the SIM card in your iPhone --> https://support.apple.com/HT201337