Car all of a sudden started smoking white smoke, shutting off and making a knocking noise?

It’s possible the knocking is some minor problem. My Corolla’s alternator makes a slight tapping sound and has done so for 10 years. What I’m saying is, yes, that the source of the sounds needs to be determined, but at this point, don’t assume the worse. Best of luck to the OP.

If this is the 3,8 liter v6 engine, then I think you have a valid concern about the head gaskets.