This is one of the reasons Discovery effectively promoted Tilly rapidly (all the way to being the XO for a little bit) because she was a pivotal part of the cast and needed screen time.
It's a testament to Mary Wiseman's acting that the writers sought to give Tilly more screen time. But the way they did it made my eyes roll through the roof. I did not for a second consider it believable that an Ensign, only a couple (?) of years out of the Academy, would be skyrocketed through the hierarchy to become the Chief Operating Officer of the ship.
Tilly's promotion was even more unbelievable than when Jed Bartlet made CJ Cregg his Chief of Staff, elevating her above her Toby Ziegler (whom she reported to) and Josh Lyman. I know why the writers did it - because Allison Janney was the best actor in a world-class ensemble, and they wanted to give her more to do. But it didn't ring true to me (even though there is an argument to be made that all the West Wing characters are so hyper-competent that reporting lines are mere formalities).
Sure, you could argue Starfleet has a history of promoting promising youngsters unbelievably fast - like when they gave that cocky repeat offender fresh out of school command of the most modern ship in the fleet simply as a reward for saving the world. But even so.
This actually goes to a related point about DIS and how the writers treated the rank of its main character. Discovery was notable in that it was the first show where the lead actor was also not the most senior member of the crew. As David Gerrold pointed out in The World of Star Trek (IIRC), there's a reason why the captain is the star of the show. Because in a crisis all decisions come back to that role. And the ability to make decisions is what makes for good characterisation (Hamlet notwithstanding). But if the command decisions, the decisions around which the plots and the drama pivot, are ultimately made by someone other than Michael Burnham, more senior than her and who can overrule her, what do you do then? Well, you make the Captain a baddie (like in season 1) or you find other ways of making the main character go against orders (which Burnham did repeatedly). Unfortunately that led to a backlash because the character, Mary Sue-like, was always proven to be correct whenever she went rogue.
I actually liked the fact that the lead character in DIS wasn't the CO. But - like Tilly's promotion - I just wish the writers had found a better way of exploring that dynamic. Having Burnham assume the traditional captain's seat in season 4 was - in some ways - an admission of defeat, but an understandable one.
Lower Decks of course pulls it off, but as a comedy the stakes are generally lower, and the fact that the main characters often don't know what's going on, or aren't in a position to decide how to shape events, is part of the gag.