Short answer: it is one of two things, and on your own Mac both are reversible in under a minute.
Either someone ran a defaults write command that set an immutable key, or a real configuration profile is installed. macOS shows the same greyed-out message for both, which is why this is so confusing.
The fix is different for each, so check before you change anything.
Open System Settings, go to General, then Device Management.
defaults write command is doing it, and macOS is describing it inaccurately. That is the first section.macOS has four hidden Dock settings that lock parts of it. Any of them will grey out the matching control in System Settings. You do not need to know which one was used, so run all four with false and you are back to normal:
defaults write com.apple.dock size-immutable -bool false
defaults write com.apple.dock position-immutable -bool false
defaults write com.apple.dock contents-immutable -bool false
defaults write com.apple.dock autohide-immutable -bool false
killall Dock
The killall Dock at the end matters. Without it the preference changes but the Dock keeps running with the old one, and it will look like nothing happened.
Not sure whether a lock is set? Check one without changing it:
defaults read com.apple.dock size-immutable
The free command generator will write the undo commands out for you if you would rather not type them.
You will get 1 if it is locked, 0 if it is not, and does not exist if it was never set.
In System Settings, General, Device Management, select the profile and click the minus button. The Dock controls come back immediately.
A profile can get there three ways. You installed one yourself, perhaps from an app that offers a permanent lock. Something else installed one. Or the Mac is managed by an employer or a school.
If the Mac is managed, you cannot remove it. Managed profiles are deliberately locked and there is no local workaround. Ask whoever administers the machine. Anyone claiming otherwise is describing something that stopped working several macOS versions ago.
This is the part that sends people looking for answers. The immutable keys are the same mechanism organisations use to manage Macs at scale, so System Settings reports them the same way, with the same wording, whether they arrived from a company's device management or from one line you typed months ago.
So "these settings have been configured by a profile" does not mean your Mac is managed, and it does not mean anything is wrong. It usually means a Terminal command from an old how-to article is still in effect, long after you forgot running it.
If you locked the Dock deliberately, the greying out is the feature working. The real problem is that there is no visible switch, nothing telling you it is on, and no record of what your Dock looked like before.
That is worth solving properly rather than remembering four commands. Still Dock locks your Mac's Dock and puts the same four locks in your menu bar as switches you can see, so a locked Dock is obvious rather than mysterious. It also snapshots your Dock before locking it, and puts it back when you unlock, quit, or delete the app.
If you would rather stay in Terminal, the full list of the four commands explains what each one does and what it costs you.
Using more than one screen? The Dock also jumps between them, which is a separate problem with its own fixes: how to keep the Mac Dock on one screen.
No. It is a standard macOS message about device management, and the most common cause on a personal Mac is a defaults write command run at some point in the past. Check System Settings, General, Device Management. If nothing is listed, nothing is managing your Mac.
Each lock is separate. size-immutable greys out only the size slider, position-immutable only the position control, and so on. Running all four false commands above clears whichever one is set.
Then both causes are present. Run the four defaults write commands above, including killall Dock.
If it is a profile, yes, remove it in System Settings, General, Device Management. If it is an immutable key, macOS gives you no interface for it, which is the gap Still Dock exists to fill.
No. Unlocking changes only whether the settings can be edited. To actually reset the Dock's contents you would need a full reset, which is a separate thing.