Do you know how to wire a light switch? How about a receptacle, aka outlet? If the answer is no, you should learn! It’s not ...
The junction box should always fit flush to the wall. You may see a third wire ... works on your light switches, ask if you need to add ground-fault circuit interrupter (GFCI) outlets.