SC2272-M4 Behaviour when using relay SRD-05VDC-SL-C 5V DC
The XY-DKM-5V doesn't appear to have a data sheet so if you could find one that will help you immensely - any electronic module that can be bought that doesn't have a pdf data sheet in my book is not worth buying.

Anyway, I suspect the problem is glitching on the supply when the relay coil is first activated and this might be cured by adding a ceramic 10uF capacitor across the power rails of the feed to the module. You might also consider putting a small resistor in series with the relay to limit its current slightly - hopefully it will still work of course.

I don't know how you constructed this circuit but if on a breadboard then you will undoubtedly have to wire it together with more care and attention. If it's on a circuit board then there could still be issues so please show your construction.

Alternatively your relay may be demanding far too much current that what your power supply can give so please check this too.