His acting trajectory is very unusual. Hanks started off doing slapstick comedies and fluff 80s romantic comedies. I’m not sure when he suddenly became a De Niro-type actor.
I recall in the early 90s he made the transition with roles like Philadelphia and Forrest Gump. One factor that I think helped his success is that his show Bosom Buddies didn’t last.
Usually when actors are part of a long-running television ensemble, their careers never achieve the same level of success once the show ends. There are exceptions, like Michael J. Fox.