4.1 Turn on Apple two-factor authentication
On iPhone:
Settings
→ your name
→ Sign-In & Security
→ Two-Factor Authentication
Apple states that 2FA adds an extra layer of protection: someone who knows your password normally cannot sign in on a new device without the second factor.
4.2 Check the devices linked to the account
Settings
→ your name
→ scroll to the device list
You should recognise your iPhone, your Mac, any iPad and your other Apple devices. If an unknown device appears, look into it immediately and remove its access if needed.
4.3 Add a recovery contact
Apple lets you name a trusted person who can help you recover your account.
Settings
→ your name
→ Sign-In & Security
→ Account Recovery
→ Add Recovery Contact
The contact has no access to your account. They can only generate a recovery code when you need one. For a beginner this is usually an excellent safety net.
4.4 The Apple recovery key: be careful
Apple also offers a 28-character recovery key. This is a more advanced security option.
If you are new to this, start with a recovery contact instead.