NPCs are not protagonists, except in unusual circumstances. So how do you make them interesting, part of the story and not a drag, but leaving the spotlight to the PCs?
Niche. Stereotypes are great. They add interest to a character without requiring a heavy focus to explore and create that interest. For a bit part, nothing is better. Reversing a stereotype, to create an erudite scotsman or a well-travelled hermit, is even better.
Subordinate Social Role. 'Get in there and clean that ballast, Ensign!' 'Yes sir!'. If they're accepting the command of another person, they immediately lose agency and spotlight, which is good for NPCs. Doesn't mean they can't have characterization of their own - but the Private is assumed to be less important than the Sergeant.
Less Screen Time. Tim the Engineer spends his time in the Engineering Bay, because he has work to do. On the Bridge, where the Action is occurring, he is rarely present - thus he is less likely to one-up the PCs.
Make the Players do It. Give them a set of bonuses, or even a full sheet. Tim the Engineer is now being played by Joe, or Rachel, or whoever. Like a cohort or other 'secondary' character, his demeanour and usefulness are now in the hands of the players - and they can choose to give him as much or as little spotlight as THEY like.
Bashfulness. This guy doesn't WANT the spotlight - he prefers to work in the background, and that's his trope/milieu - 'naturally retiring' is great for a bit part that you actually don't want to be around much.
Curse of the Engineer. If it's a new guy every couple sessions as Engineers keep leaving for various reasons (not just death), then his 'spotlight time' is justifiable as introduction, and less of a problem.
Useless. NPCs who are problems for the PCs to resolve (in terms of attitude, skill or situation) aren't spotlight hoggers - they're quests! Quests are great! 'I cannae do it captain, she's givin' it all she's got!', 'We're all doomed, we're all going to die! AHHHHHHH!', 'Oh no... oh no.. they've found me! The Lizard Men!'.