Welcome. My name is XXXXX XXXXX would be glad to assist.
1. On the fan in the bath.
First, you need a voltage tester in order to determine the problem without guessing.
You would pull on the fan cover downward, which it will slide on the captive clips until they stop.
Then squeeze the clips and remove the cover.
The fan motor
will plug into a receptacle in the housing. Unplug the motor and test
the receptacle for 120 volts with the switch ON>
You could use a small lamp for this if no tester is available.
If power is present, the fan motor needs replacing.
If no power, then need to remove the switch cover plate and test the switch.
The switch has 2 brass screws on the sides. Take a tester and put one lead to one screw and the other lead to a ground wire in the box.
Do the same for the 2nd screw.
With the switch ON, you should read 120 volts on each screw.
If not, replace the switch.
They sell replacement motors for many brands of fans, so the key is the Make and Model number to get one which is printed on the inside housing.
Wall switch is standard at any supply store.
2. On the garage, if that is the wire going to the photo eyes at the bottom of the door, just coil it up any way possible and tack it to the wall or ceiling.
Do not break or tear the wire as you are positioning it and fastening.
If it isn't a wire, let me know, as it isn't clear what it is in the picture, but looks like wires to me.
They will not electrocute or anything, it is a signal based wire and cannot hurt you in any manner.
Just reply for any other info.