What do I do with the red wire on the new switch if there are only three wires in my box?
Uh, nope.

Looking at the large view of your picture, the wiring diagram is clear, and that switch will not work in that location without re-wiring.

You would appear to have a "switch loop" where the black (usually) is carrying hot from the supply at the fixture and the white (usually, and it should be red-taped but often is not) is carrying the switched hot back to the fixture. This was common and met code years ago, but does not meet current code, which is designed to support switches like the one you have as a new switch, that need a neutral to support some power use in the switch itself.

That will only work as is with a similar mechanical switch.

The switch you have is expecting to get hot, neutral and ground, and then to run the switched hot to the load out the red wire. Problem being, you don't have a neutral in that box.

You either need to use a similar mechanical switch, or you need to replace the wire from the fixture to the switch with a cable that has 3 wires and ground (typically black, white, red, bare) so that there is a neutral in the switch box.

If you use a mechanical switch, do the next person (it could be you) a favor and put red tape (or use red paint or marker) on both ends of the white wire (the one at the switch and the one at the fixture, which should be connected to the fixture's black wire, or, if fed abnormally, to the incoming hot wire at the fixture.)