If your phone doesn’t go to sleep when you press the power button, it could be due to:
App Interference: Some apps or services might prevent your phone from sleeping. Apps that use background processes or keep the screen on can interfere with sleep mode.
Power Button Issue: If the physical power button is malfunctioning or stuck, it might not be registering your press correctly. Try pressing it firmly and check if it feels different than usual.