Before your final walkthrough with the builder.
Order the inspection too soon and not only do you risk having things like sinks not be installed, but the inspector will be marking items they just haven’t instaled, yet.
Too late and you miss your chance to fix issues before closing.
The sweet spot is AFTER the work is completed (and everyone is out), but BEFORE the final walkthrough.n
That short window lets you share defects with the builder before closing so they can get fixed before you move in.