I was reattaching the rails of older deck. Spacing was too wide. They removed easily enough. PT rails. I used a space block, checking the plumb now and then. I didn't try to arrange the spacing for all even rail spaces. I used 2x4 as blocks but I think the code is for 4" space between the rails. I looked for and bought stainless finish nails. I forget which but I have 15ga bostitich and 16ga paslode. I think I used paslode. I think they were just 2". I used the finish nail, one on top and one on bottom, to just hold the rails. This went fast. Then predrill/countersink all at once and screws all at once, 2.5" coated deck screws, 2 screws per side.
I tested the countersink size and used the one that is bit smaller than the screw head. Also just measured the countersink depth by eye. This way, screw heads ended flush to the surface. I applied solid stain to the rails but the screws were coated gray. All woods eventually turn gray so this color screws may be best choice.