Can someone explain what the correct steps are to create toolbar items please?

I am trying to get the same toolbar item behaviours as Xcode 12 and Safari but nothing I have tried seems to produce the same size icons or the mouseover background. Is there a step by step guide that explains exactly what the procedures is and what types of toolbar items are supposed to be used. I have tried Toolbar items with images and custom views with different types of buttons but to no avail. It's hard to believe it can be this hard and the WWDC 2020 talk about adopting the new look being a few simple steps if any seems completely wrong.
Can someone explain what the correct steps are to create toolbar items please?
 
 
Q