What causes glitches and damped oscillations during the switching on and off of mosfet?
If you are asking what causes the parasitic capacitance, look at the construction of the gate on the MOSFET. Two metal layers, separated by an oxide layer (dielectric). The definition of a capacitor. Also to get from one metal layer to another in a semiconductor device, you have to go through “vias” made from tungsten metal. These vias are like thin metal wires that act like inductors. Any Capacitor-Inductor circuit will resonate at some frequency. When they are really small in value, they resonate at very high frequencies. Like the rise time of the Mosfet gate itself.