NCC (or Naval Construction Contract) is, along with a starships name, one of the two identifiers of a starship. As such, it is important for any player ship to have one. In some cases, such as if the starship were taken from a book, the NCC will be preexisting and provided already, and as such will be possible to use so long as it is not needed to be altered for whatever reason. In many cases, however, the number will not exist as the ship is totally created by the player. A basic idea for NCC registries is that the higher the number is, the newer the ship. This is partially correct, but there are also other factors that affect it.
If the number has to be made up, there are a few simple factors to note when choosing an Naval Construction Contract number. Simple, at least, compared to the issue of having to make since out of NCC numbers in a very hectic Star Trek canon. For that reason, the following are basic guidelines in the hows and whys of NCC numbers:
NCC numbers often represent the newest ships made.
A ship labelled NCC-1701 will likely be newer and more recently produced than a ship labelled NCC-1001. The higher the NCC number, the newer the NCC number, because that NCC is given a ship lower down in the production roster for construction, and thus more likely to be produced later. There exists the possibility, however, that a ship will be lower on the production roster, but built at the same time as a ship higher on the production roster due to being produced elsewhere at the same time. In such a case, this rule does not hold true.
NCC numbers tend to be in a certain range per starship class.
Constitution class starships tend to range in the 1700s. Miranda class starships tend to range in the 1800s. Etc. This does not mean that a starship from a certain class can go outside this range, especially given NCC can denote a newer ship rather than a ship of a different class.
NCC numbers can be reused.
In later eras of the Star Trek universe, this rule will not apply. Either a ship will have a hyphen and the addition of a letter to show it is the latest in that line (ie, NCC-1701-D) or an NCC will simply not be reused and replaced with a new number (ie, NCC-1672 was the USS Exeter in the TOS era, but NCC-26531 was the USS Exeter in the TNG era of a hundred years thereafter).
In this era, starship numbers will either be reused for the next in that line of starships (meaning the next NCC-1802 will also be NCC-1802), transferred to another new starship of different name and/or class, or survive even if a ship is totally refit to a different class of starship. This fact helps explain why the USS Constellation is NCC-1017 and yet is a Constitution class starship almost a century after that registry would otherwise make sense.
NCC numbers and number ranges are reserved for certain starship projects.
The USS Loknar is NCC-2700 and the USS Larson is NCC-4000, and yet the USS Excelsior, to be newly commissioned in the 2280s, is NCC-2000. How can this be? The explanation arrives in the idea that certain NCC registry numbers and registry ranges are reserved (in at least certain cases) for starship projects and plans before said projects come to fruition. As a result, NCC registries then move around those reserved spots, increasing upward as they go. This also explains how the USS Loknar and USS Larson can be commissioned and active in roughly the same era, given their number and production slots were reserved at the same time, and their construction begun close to one another, though one was lower on the list than the other.