Your description is not that clear.
I am guessing an educated guess. Copper (bare) is the ground. Join it at light/fan box to ground screw (green?). Twist white light/fan wire to white wire from switch and cap. Twist black and red light/fan wires together and then twist to black from switch and cap.
Switch box: Hot Black "from box" goes to one screw terminal or insert on switch. Black from light/fan goes to other screw terminal or insert on switch. Both whites in switch box do not go on switch. They twist together and cap.
If switch has grounding screw, ground it from surplus bare copper. If switch has more than 2 terminals, you've got the wrong switch.
I am guessing an educated guess. Copper (bare) is the ground. Join it at light/fan box to ground screw (green?). Twist white light/fan wire to white wire from switch and cap. Twist black and red light/fan wires together and then twist to black from switch and cap.
Switch box: Hot Black "from box" goes to one screw terminal or insert on switch. Black from light/fan goes to other screw terminal or insert on switch. Both whites in switch box do not go on switch. They twist together and cap.
If switch has grounding screw, ground it from surplus bare copper. If switch has more than 2 terminals, you've got the wrong switch.