if you’re on iOS, i found that the focus feature + screen time limit is pretty good at this. basically you can block out any notifications that you want for a set period of time. but yea, it still doesnt stop you from physically reaching out to your phone
Try the app called Opal. Similar thing but you can always skip the block. The trick is that each time you skip the block, there’s a longer and longer cooldown period to skip it again.