I've always liked to have all the icons for my frequently used apps in the dock. I know with a simple CMD + Space I can bring up any app but something about launching them from the dock has always been preffereable. Maybe I just like to look at the icons.
Either way. With too many icons in the dock things get cluttered quick and then it's hard to find the app you'd like to launch. Enter spacers to divide up apps. I divide them by purpose.
You can use the default macOS terminal app or the terminal app of your choice.
You can add two different sizes of spacers. I personally use the standard icon size since I like the uniformity.
defaults write com.apple.dock persistent-apps -array-add '{"tile-type"="spacer-tile";}'; killall Dock
defaults write com.apple.dock persistent-apps -array-add '{"tile-type"="small-spacer-tile";}'; killall Dock
You can move around the spacers in the dock by dragging them just as you would a normal app icon.
If you would like to remove any spacers you have added, you can remove them by right-clicking the icon and selecting "Remove from Dock" and poof it's gone.
You can contact and connect with me through email, on Dribbble, or LinkedIn as well.