Get yourself a good meter to confirm there is no voltage (absolutely ZERO and nothing more!) on your circuit before you touch anything. Wear safety glasses (pushed tight up close to your eyes) just Incase it sparks. Double verify no voltage before touching it. That means test it, confirm your meter works, then test it again, then confirm once more with a non contact voltage tester or some other secondary device. I’ve seen too many disconnects and breakers fail to trust them anymore. Take off any metal jewelry and anything conductive that you have on you.
After that, with the power still off, you can pull the switch and test it for continuity.
If you don’t have proper training and experience then you should not work on anything live.
If the switch is good then check for bad connections.
Make sure you reconnect the wires properly and securely. An improperly connected wire can cause excessive heat and start a fire.
If the wiring is aluminum then leave the job to a professional. There are way too many specific procedures involved when dealing with that to explain it in this post, for it to be done safely.
If in doubt call a professional. Electricity is silent and can’t be seen... until it bites you.