Great question — answering as the UphillTech team:
From the second photo, as outlined below, clearly a bare copper wire enters the box and is wrapped around the bottom screw. The screw above it should be in the same piece of metal and offers a good ground point for the switch. However, from the first photo, the path to ground is not clearly shown. It is likely the metal box is grounded, but the conduit entering is plastic, and I do not see another ground. The bluish -green insulated wire might, or might not, be ground, and the connection is not shown.
Full answer by DrMoishe Pippik: https://diy.stackexchange.com/a/332159 (CC BY-SA 4.0).
Need it done for your business? UphillTech.