Switch mqtt

Hi

Im new here and very inexperienced.

I’m just trying to make a button/switch that posts a payload to a mqtt topic when turned on and off