Einstein Sue
There's a crisis underway! The Alien Invasion is imminent, there's a 50 foot tall monster ready to attack Tuvalu, a huge cache of nuclear missiles may be launched needlessly, a humanity-destroying virus is about to be released on the unsuspecting public, and the President's daughter has strep throat!! No matter, there's a huge team of scientists working on it. The entire world's best efforts are focused on the problem, and—wait, that one guy at the hot dog stand in Des Moines has the solution! Never mind how grossly unqualified he is, how totally unconnected he is to the situation, he knows exactly what's going on, if only he could get them to believe him. It seems in a big world full of know nothing experts, he is The One Guy With a Brain. In a What Could Possibly Go Wrong? situation, he's the only one who sees it besides the audience.
Why isn't this guy in charge of the crisis? Well, maybe he's a Cowboy Cop who is held back for insubordination. Maybe the Obstructive Bureaucrat won't promote him because he never technically got his degree. Maybe he made a career-limiting mistake in the past, or The Rival made it look that way. But it could be that our hero just likes their current job and has turned down better positions, or an enthusiast on the subject who doesn't want to mix their passion with work. In any case, the real reasons are that we like to see an underdog win, and we want a protagonist we can identify with.
In a long-running show, it's tempting to make a character into one of these for a day, especially an Ensemble Darkhorse, but especially a Creator's Pet. When this happens, expect everyone else to suddenly drop 50 IQ points while our hero saves the day.
Compare Ignored Expert, The Cassandra, Only Sane Man. Related to The Only One, and may overlap with The Main Characters Do Everything. See also Too Dumb to Fool, for when the obvious solution is too obvious to be noticed.
No examples, please; Mary Sue Tropes are by their nature YMMV Tropes, and we don't need the flamewars.