Another annoyance in my Ubuntu 22.04 are icons for all mounted drives on the dock.
I prefer to have my Dock clean and only stuff inside that I need.
So I open my terminal “Ctrl+Alt+T” and type in
gsettings set org.gnome.shell.extensions.dash-to-dock show-mounts false
All removable disk and USB icons on the dock will disappear immediately after running this command.
To undo this, you can run
gsettings reset org.gnome.shell.extensions.dash-to-dock show-mounts