Choose the correct box.
The first step to nailing up electrical boxes, for new residential wiring, is to choose the correct box. Electrical boxes come in various styles, materials, sizes and shapes. It is easy to become overwhelmed with choices. Here are just 6 different styles of boxes, with different material and volume sizes but all of which are the same shape, in this case; a single gang (made for one device receptacle or switch)
When nailing up boxes to install new wiring you would only need the first box at the left, the single gang nail on box. Preferably a 20 cubic inch deep, tan fiberglass one gang nail on box, but this 18 ci blue plastic nail on box will do.