You must have an Apple ID to use the integrated services of Apple. One is required to set up any new Apple device. You should change it immediately if you think it's been compromised. Change it every few months to make it more secure.
You have to think of a password that is at least eight characters long and uses at least one number, one uppercase letter, and one lowercase letter. Passwords from the last year are not allowed.
If you want to change your Apple ID password, you have to follow these steps. If you know your password, you will be able to use these. You can initiate the reset password from any of your Apple devices if you forget it.
On your iOS device
On your iPad, iPhone, or Apple Watch, go to Settings, tap on your name at the top, and choose Password & Security.
Choose Change Password.
You’ll be prompted to enter your device passcode and then enter a new password and confirm it.
Tap Change.
Back at the main Settings screen, sign in with your new password to access Apple features and services.
On your Mac
Click on the Apple menu in the top left-hand corner, choose System Preferences, and then click the Apple ID tile.
Click on Password & Security.
Click on Change Password.
Enter the password you use to unlock your Mac computer.
Enter your new password and verify it.
Click on Change.
On the web
Go to appleid.apple.com.
Click on Sign In in the top menu bar and sign in to your Apple ID account.
Select Sign-In and Security in the side menu.
Select Password.
Enter your current password, and then enter a new password and confirm it.
You can also choose to sign out of all Apple devices and websites here by selecting the checkbox.