Gear is fun! Most guitar players love experimenting with effects pedals, amps, and guitars; creating cool and interesting sounds. It's also fun trying to emulate the sounds of out favourite players and songs.
However, buying the same gear that your heroes use won't make you sound like them. There are many stories where players have played through another players rig, only to find that they still sound like themselves, or vice versa, a well known player has played through very humble gear... and still sounded like they do playing through their own gear.
The point is, a large part of a players "sound" is contained in their stylistic DNA; their touch, their phrasing, their personal of concept music... and these things don't change too much because of the gear they are using.
With that said, most of these players have settled on the gear that helps them to articulate their musical voice. Eddie Van Halen doesn't use a Fender Twin, Stevie Ray Vaughan didn't play a Les Paul through a Mark IV Mesa Boogie... each artist used gear that became an extension of the sound they heard in their head and helped them to articulate that concept.
My advice would be, have fun experimenting with gear, but don't get caught up in it. If there are players you really like, you'll get closer to "sounding like them' by spending more time practicing and copying their licks and riffs, and their phrasing and articulation.
But... gear and can also be very inspiring, and it can also help you to come up with your own ideas, or even create your own signature sound, just like the players we love to listen to.
Below I have created diagrams that illustrate some famous guitar rigs. Please keep in mind, many players have experimented with different gear over different stages of their careers. Also, the studio plays a big part in the sound you hear on recordings, with mic placement, EQ, effects, compression all playing a major role in the way things sound when we finally hear them. The diagrams are just to help you get into the same "ballpark."