Nail it by hand.
IMO before using a power tool, one should learn to do the job by hand first. This is not always easy, but it will make you better with tools in general. It will give you a better feel of how well that nail you just shot in with the gun is holding, vs if you missed or split the edge of a stud, where it may hold up trim, but not a loaded shelf.
sometimes you have to get a little creative, and think outside the box. If you had to, you could predrill your holes that would make nailing easy.
Use a level, make small light pencil marks that could be easily erased. This will give you a mark to hold the piece to. Then you have to judge when the nail is about to come through, then double check the alignment, and give one more whack. That should hold it in place, on one side while you finish the nail. In the beginning do not drive the nail all the way in so it is easier to pull, if you need to make an adjustment. If the first nail seems to be in a good position, start the second nail in the same fashion, double checking alignment before the nail grabs.
There is more than one way to skin a cat. Doing this is frustrating at first, but experience can be a good teacher. What those thumbs, a needle pliers can help to set nails into the material. I could go all day here. someone with experience to show you would be best.
YouTube this old house tv show. Watching other people you can always pick up a few things.
A lot times the gun nails are so cheap that they break before a head would pop off. Use angles for better holding friction.