Bill Simmons (The Rewatchables) has a few podcasts where he talks about Keaton and Tom Hanks basically being 1 and 1A into the late 80s, where most of their work in the 80s you could easily see the other guy being in the movie - Splash, Big, Mr. Mom, The Money Pit, Night Shift, etc.
But then in the late 80s and early 1990s, Keaton pivots first to Clean and Sober and then to Batman and Pacific Heights and Batman Returns where he's playing a lot of dark, brooding characters and veers away from his 1980s success.
Meanwhile, Hanks looks like he's on the way to mid-level stuff after Joe Versus the Volcano and the Bonfire of the Vanities are both commercial failures, especially the latter with him, Bruce Willis, and Melanie Griffith headlining. it. Being a black comedy, it's a departure for Hanks, and it's a big whiff.
But then he gets A League of the Their Own, where's kind of an ******* but still a nice guy, and suddenly he's A1 choice for non-threatening, leading man and goes on the unprecedented run of:
Sleepless in Seattle, Philadelphia, Forrest Gump, Apollo 13, Toy Story, That Thing You Do!, Saving Private Ryan, You've Got Mail, Toy STory 2, The Green Mile, Castaway, and Catch Me if you Can.
And the thing is, in all of those, he's still just a nice guy. The roles change, but Hanks is still easy to root for, easy to laugh with, easy to get along with. If you look at that list and think about Keaton, he could have easily done most of those roles - the 2 rom coms for sure, Philadelphia, Apollo 13, SPR, and Castaway as well. But once he veered into the harder character pieces, Hank became the guy for the big movie.