Hey there ashkate7,
Thanks for reaching out to Apple Support Communities. I understand you have some concerns about the security of your Mac after the background image changed unexpectedly. I’ll be happy to help with this.
Before looking into if your Mac was hacked, have you check System Preferences > Desktop & Screen Saver to see if the background picture is set to change at all? This could explain why this happened. Take a look at this article for more info:
Change the desktop picture (background) on your Mac
If that’s not the case and you have concerns about your Mac security, go through the steps in this link to make sure your Mac is set up to be as secure as possible:
Set up your Mac to be secure
Also, make sure you have firewall enabled:
Use a firewall to prevent unwanted connections on Mac
If you think your Apple ID has been compromised, you’ll want to follow the steps here:
If you think your Apple ID has been compromised
Also, make sure this isn’t related to malware using the steps in the following link and by using Malwarebytes:
Protect your Mac from malware
Malwarebytes Cybersecurity for Home and Business | Malwarebytes
Regards.