Like said, the headspace will be set at the barrel when they installed the barrel extension. You're just checking it after you put the bolt carrier group into the upper. The combination of the bolt dimensions and barrel extension setting will create the headspace.
Different manufacturers, and even within the same manufacturer, might have slightly different tolerances, which might stack up against your favor.
If you don't want to risk that 0.01% chance that you might have improper headspace, then you will want to check it with headspace gauges. The gauges are shaped like a round of ammunition and you insert it into the chamber and then try to close the bolt carrier group on it with your fingers. (You will need to remove the extractor from the bolt on the commercial .223 headspace gauges because they are made for bolt actions. A military M16 headspace gauge will have a groove at the base for the extractor.)
A "GO" Gauge will be at the maximum length of any cartridge you will see. So if the bolt closes on the GO gauge, it should close on any properly made ammunition.
A "NO-GO" Gauge will be longer and if it closes on the NO-GO gauge your headspace is pretty long. If it closes on a NO GO but doesn't on a Field gauge (explained below) will be safe to shoot, but you're just about on the edge of safety. A new build should close on the GO gauge but not close on the NO GO because the chamber is new and the headspace hasn't lengthened yet from being worn down due to firing.
A "Field" Gauge is very long and if your bolt is closing on the Field gauge, then your firearm is not safe to shoot. The headspace in the chamber is so long that the brass of the ammunition will stretch so much when it's fired that it might separate at the head and go kaboom.
The sticky thread at the top of this forum explain the headspace gauges in better detail.