With the Block Element you don’t require any code.
Once you create a new Block Element you will see the default Block editor.
Add a Container Block, go to the Spacing settings and reduce the padding to about 10px. Then the Colors and set the Background color.
Inside the Container Block add a Buttons Block – add your text, icon, link etc. and change the colors to suit.