For muscle growth, the evidence suggests the type of equipment matters less than the work you do with it. A meta-analysis of studies comparing free-weight and machine training found no difference in hypertrophy or overall strength in direct comparisons — but strength gains were specific to the equipment trained with.
Free weights demand more from stabilising muscles. In a small electromyography study, the free-weight squat produced about 43% more average muscle activity than the Smith machine squat, with higher activity in the calves, hamstrings and vastus medialis. One-rep maxes also differ between the two: in one study, squat 1RM was higher on the Smith machine and bench press 1RM higher with free weights, so loads do not transfer one-to-one.
The practical reading: a Smith machine is a legitimate tool for building muscle and a safe way to press and squat heavy alone, but if you want a bigger barbell squat or bench, keep training the barbell versions too.