Looks fairly straightforward
go to this website
https://apps.kubotausa.com/illustrated-parts/
It looks like there is some removable cover that is part of the dash. You may have to get the steering wheel off but I don’t know that for sure.
It looks like the key switch is the style that has a silver round nut holding it into the dash. There is a slot in the dash for a tab to keep the switch from rotating and a washer underneath the nut to allow it to get tight.
If you are replacing it buy the switch assembly and you will see exactly how it works.
Have you tried cleaning the existing switch? I would say that you can use WD40 or something better and see how it works after spraying down the key slot.