So, I am using Zorin OS 16.3 Core and noticed that the icons on the taskbar love their white space, and a handful of them almost fill the entire bar.
Unfortunately, I cannot find a way to adjust their margins.
As per the thread already discussed here, I edited /usr/share/gnome-shell/extensions/zorin-taskbar@zorinos.com/taskbar.js, and that worked beautifully—for the app icons on the left.
The icons on the right are left entirely unimpressed, though, and continue to claim their space:
This is because the icons on the right are a different extension: appindicators.
So you might wanna go to this folder: /usr/share/gnome-shell/extensions/zorin-appindicator@zorinos.com
I have never edited anything there, but probably it's the file appindicator.js.
These appindicators are placed inside the right container on taskbar settings. There's no way to edit their size on a GUI though, at least not by default, and not even on taskbar settings. Now, I'm not good at code but this seems a matter of button size, not padding or margins.