How do I wire a wifi light switch with wiring that doesn't match the install instructions?
The group of white wires are the neutrals: 1 coming from the supply and one going to each switched circuit. Don't separate them, just add the smart switch's white wire to the wirenut.
The red wire is the switched hot to the load: connect this to the red wire on the smart switch.
The black wire on the backstab is the hot from the supply. The hot on the screw is continuing the hot to the second switch, using the guts of the old switch as a jumper. This is not at all unusual. Assuming you want to keep the second switch, take both existing blacks and combine these with the black wire from the smart switch, using a wirenut.
When you attach a wirenut, twist it on tight and then pull on each wire to make sure it's secure.