To deal with attempted hacks, see these security-related documents, especially the first two for now.
If you think your Apple ID has been compromised https://support.apple.com/en-us/HT204145.
Security and your Apple ID https://support.apple.com/en-us/HT201303
iCloud security overview https://support.apple.com/en-us/HT202303
Ways to keep your information safe on Mac https://support.apple.com/en-gb/guide/mac-help/mh11402/mac
Using app-specific passwords https://support.apple.com/en-us/HT204397
Use Two-factor authentication for Apple ID https://support.apple.com/en-us/HT204915
__________
To deal with your specific problem, Check your Apple ID device list (https://support.apple.com/en-us/HT205064) and remove any device that shouldn't be signed in using the steps in the link.
If there are none that shouldn’t be signed in, then you should not have a problem at this point. But, if an unauthorized device is signed in, Change your Apple ID password https://support.apple.com/en-us/HT201355
Here is What to do after you change your Apple ID or password https://support.apple.com/en-us/HT204071
For Apple Support help with your problem, use:
Get a call from Apple support to help solve your problem using this link https://getsupport.apple.com/?caller=kbase&PGF=PGF63005&category_id=SC0245&symptom_id=23362 Be patient. Phone support is not always available
Apple ID Support https://support.apple.com/apple-id
Apple Support Twitter https://twitter.com/AppleSupport There may be an hour or so wait.
Apple ID account security for country-specific and region-specific help https://support.apple.com/en-us/HT204169
Get Support: We’re here to help https://getsupport.apple.com/. Go through the options to find the best support option.