See the instructions below.
Change your Apple ID (Be very aware of the restrictions here.) https://support.apple.com/en-us/HT202667
Before changing your Apple ID using a computer, sign out of all Apple services that use your Apple ID. If you are going to use an iPhone, iPad, or iPod, then stay signed in with your Apple ID on only that device. This instruction is taken from the above document under the heading Before you change your Apple ID.
For sign out purposes, see Where can I use my Apple ID? https://support.apple.com/en-us/HT202659 “This list is provided for informational purposes only and is subject to change without notice. It's not intended to include every feature or service that uses Apple ID. Visit the Apple ID support page for more information.”
There may be some redundancy, but see What to do after you change your Apple ID or password
https://support.apple.com/en-us/HT204071
But, note that if you are having a password problem, then you will need to see If you forgot your Apple ID password https://support.apple.com/en-us/HT201487
You also can use Having trouble signing in/iForgot https://iforgot.apple.com/password/verify/appleid
Eventually you may need to see If you forgot the answers to your Apple ID security questions https://support.apple.com/en-us/HT201485