When hanging the shelves to the wall, you can use a level before you mark your drill holes. Your stud finder can help you locate studs. You can drill your wood screws directly into the stud (no anchor needed).
If you don’t have a stud where you want to mount a bracket, you can drill an anchor into the wall and then drill your screw into the anchor.