As someone who’s recently been spending more time with a MacBook Air both hooked up to an Apple Studio Display and on its own, I’ve definitely noticed that what works in one setup isn’t always the best answer for all display configurations.
The idea behind HiDock is simple: based on the current display situation, it can automatically change your Dock’s size; whether it’s positioned on the left, right, or bottom of the screen; and whether it’s shown or hidden. So if you prefer to have a left-mounted Dock when you’re connected to an external display, but a bottom Dock when your laptop’s out and about, you can set those options and have HiDock handle it for you. There’s also a configuration for when you have multiple displays active, as opposed to using the MacBook in clamshell mode.
HiDock is exceptionally simple to use and has a very straightforward interface that lets you preview exactly what your screens will look like in various monitor setups. (There’s no option, of course, to set different Docks for the different displays in your setup, given that macOS generally handles that on its own, depending on whether you’re mirroring or extending your display.)