Visiting Switzerland by car has its own advantages.
As there are many train rides where you experience beautiful mountains, the same goes for roads. There are many mountain passes which are well known in Europe and if you drive through those, you will see many sports/fancy cars and motorbikes because people come to enjoy a fun mountain drive. Furthermore, if you just want to enjoy the view, you can stop at many viewpoints, which are amongst the way. Freedom to come and go whenever you want is the biggest advantage.
Downsides, which are a little more common nowadays, are crowded roads. Switzerland is a wealthy country and most families own more than just one car. Highways and most of the road net was not built for the amount of cars which we have nowadays. Add tourist traffic on top of that and you have traffic jams around bigger towns and famous points of interest.This goes hand in hand with parking that can be a problem as well.
Interestingly, a family of 4 might even be cheaper to rent a car than to buy a Swiss travel pass for everybody. This only works if you are not planning to visit too many mountain peaks by cable cars or trains.
So consider what your plan is, where you want to go and what you want to do. That should help you with deciding if you should choose a train or car.