How do you distinguish between transverse and longitudinal waves?
Transverse waves shake perpendicularly to the direction of propagation, like waves in a guitar string. Longitudinal waves shake along the direction of propagation, like an accordion compressing and expanding. For mechanical waves, all you need to do is set up something that can be vibrated and see which direction makes it shake more. For light waves, they’re all transverse.