Power supply slow rise time and ringing
But now, If I connect a toggle switch between the power supply and the board. And I keep the switch in OFF position first. Now, I turn ON the power supply and then I turn ON the toggle switch as shown above, I get this waveform.

This is a timeless classic ;)
The power supply has capacitors on the output, which are charged to output voltage.
The board has capacitors on the input.
The wires have inductance. Maybe there is a ferrite bead on the board input also, adding inductance.
Thus you get a LC resonant circuit:



simulate this circuit &ndash; Schematic created using CircuitLab
When the switch closes, it will ring. If peak voltage is high enough, some component can fry. Q of this resonance is:
\$ Q = \frac{1}{R} \sqrt \frac{L}{C} \$
If you intend to use a switch on the DC power input, you have to bring the Q down to avoid the overvoltage peak.

You can't decrease L since that's fixed by the length of wires.

You can increase C by adding caps on the input of your board. Note C represents the series combination of the caps in the supply and the caps on the board.

You can increase R by adding a largish value electrolytic with some ESR, or a smaller MLCC in series with a resistor, straight on the input.


Tune the cap ESR (or the resistor) to get good dampening of LC resonance.
If you have a ferrite on the input, you'll have to do the math or simulate it with proper model to get good damping.

Answering this comment:

the ringing should be observable even when I don't connect the supply through the toggle switch right? Why is my first waveform different from the second waveform

If you turn on the power supply itself, it doesn't ring. Why? The resonant circuit still exists but it is not excited.
When the power supply is turned on, it slowly ramps up its output voltage. Besides avoiding any inrush current in your board's capacitors, this slow waveform does not contain the sharp edge and high-frequency components that would excite the RLC circuit. A resonant circuit cannot create a frequency that wasn't there in the original signal, it is only a passive filter. Consider the frequency response of this random lowpass filter from the 'net at various Q. For high Q there is a huge peak. But if the frequency of this peak is not present in the signal, there will be no visible resonance. Voltage steps excite it because in the frequency domain the sharp edge of a voltage step contains a wide band of frequencies...