There are three cables into the box: one is power supply from the breaker panel, one goes from the left switch to the basement lights, and one goes from the right switch to the outside light. The three whites are connected together because they all are the Neutral lines in the cables. And of course, there are three bare copper Grounding wires from those cables connected together and to a screw in the back of the box.
The left switch has two Blacks and a Red on its screws. It is a double-throw switch, meaning that it switches the power from one of the Blacks (the one from the breaker panel and also connected to the other switch) to either the second Black line OR the Red line. Both that second Black and the Red are from the same cable into the box, and I fully expect they are connected to the two screws on the SAME side of the switch body. Somewhere else (downstairs?) there will be another identical switch which accepts the Black and Red coming in (only ONE of these will have power at any one time) and sends it on to the actual lights. This way, you can switch the basement lights on and off from two locations.
The right switch is much easier - it is a simple single-throw switch. It gets power from one Black line (the one from the breaker cable and the other switch) and sends it out to its other Black line (the cable to the outside light). The wire between the two switches is just the common Hot supply line from the breaker panel, and that supply is shared by the two switches.
SAFETY NOTE: make SURE you turn off power to this circuit by opening the breaker back at the panel BEFORE you touch any bare wires!
You want to replace the right-hand easy single-throw switch. If it comes with screw terminals, there may be two or three. Look for their labels. One will be Hot or Line, one will be Out or Load, and a third may be Neutral. Or, the switch may have colour-coded wires leads: Black for Hot, Red for Load (Output), and White for Neutral. Now you will need to disconnect the two Black leads on the right-hand switch, but you must NOTE which is which. The one that is joined to the other switch and the power cable from the breaker panel is the Hot wire (power supply); the one that goes out the cable to the outside light is the Load (Output). So, connect those two to the correct terminals or wires from the smart switch. Now YOU may have to supply a third wire because the smart switch consumes a tiny amount of power itself, and needs a connection to the White Neutral wires in the box. IF the switch itself has coloured wires from it, use the White one for this. If not, create a short White wire (6" to 8" is plenty) with bared ends. Undo the yellow wire nut holding the three white wires together, and connect the new fourth white in with those other three using the same nut, if you can. (You might need a slightly larger wire nut.) IF you had to create your own White lead for this, fasten it to the Neutral screw terminal of the smart switch.
Check all your connections - are they to the correct terminals, and are they tight connections that you cannot pull loose? When done, turn on the breaker back at the panel to restore power and check that it all works.