Do all wiring with the SMPS unplugged. Every ground (SMPS COM, Arduino GND, L298N GND, breadboard − rail) must be joined: every signal is a voltage measured against that one reference.