Affleck actually had a pretty established career before Good Will Hunting. He had been in Dazed and Confused, Mallrats, Glory Daze, and Chasing Amy by that point. And did Shakespeare in Love that same year.
Affleck was a working actor prior to GWH.. meaning he was making a living , but nobody really knew who he was .. i remember seeing Chasing Amy (still a vastly underrated flick imo and still holds up) at that movie theater at the foot of Canal St on the river (Canal Place ?) and iirc it was released right around the same time as GWH, or maybe slightly before.. and maybe Chasing Amy would have made Affleck a “name” if GWH had never happened, but we’ll never know since it was GWH that sent both him and Damon into the stratosphere and onto the A list .. Shakespeare in Love i believe came out the following year, and im fairly certain he was cast in both it and in Armageddon due to the “buzz” that GWH generated even before it was released .