The dock gives you all sorts of freedom in configuration and customization.
Sort
To sort the icons you need the left mouse button. Select an icon and move it to the left or right, to the desired position.
Organize
Do you want to hide an icon because you rarely or never need it? Use the right mouse button directly on the icon of your choice and click on “Remove from Dock”.
If you need the icon again, you can find it by clicking on the WordPress icon on the far left and selecting “Add to Dock”.