whether you want size or strength, squatting is a great choice, but you have to consider what variation you want to perform and check if that variation is possible for you(if you need any flexibility, stability, equipment, and etc).
when it comes to machines, you have pros and cons that are related to the stability and balance they give you.
stability and balance come at a price and that price is a lack of freedom while doing the exercise. that is the same with the smith machine as well, but you can do 2 things to still be able to perform the squat.
1_ take a wide stance
2_ do partials ROM(range of motion)