Hello Brutalasker,
We understand you are getting a message on your Mac that says you don't have permission to use the App Store, and you're also unable to manage Apple ID settings in System Preferences. We'd like to help you get to the bottom of this.
Based off of the screenshots you provided it's highly likely MDM (Mobile Device Management) was set up to restrict the App Store and changes to Apple ID settings. MDM is a tool that allows schools, businesses, or organizations to remotely manage and configure devices. You can view some details on this here: Choose a mobile device management solution.
When devices are configured with MDM they may have a Managed Apple ID that is provided by the organization. As you'll see in the following support article, some standard features and settings that would normally be available may not be for accounts with Managed Apple ID's: About Managed Apple ID accounts on Mac.
If MDM has been set up for your device but no longer needs to be, you will need to get in touch with the organization that set it up so they can release your device from it.
Thanks for using Apple Support Communities.
Take care.