If you feel your device or account has been accessed with your authorization you need to make sure you change your password and make it a secure complex password along with having two factor authentication enabled. When you change your password it will ask you to sign out all other devices and you will select yes sign out all other devices. Please review the resources below👇.
If you think your Apple ID has been compromised - https://support.apple.com/en-us/HT204145
Check your Apple ID device list to see where you're signed in - https://support.apple.com/en-us/HT205064
Two-factor authentication for Apple ID - https://support.apple.com/en-us/HT204915
Security and your Apple ID - https://support.apple.com/en-us/HT201303
Recognize and avoid phishing messages, phony support calls, and other scams - https://support.apple.com/en-us/HT204759