I just use the digital wellbeing timer in the settings on my phone.
For the pixel on A12/13 It’s under “Digital Wellbeing and Parental Controls” -> “App Limits”. Then just hit the sand clock icon next to the app and it should let you choose a timer. 1 min before the timer runs out, you’ll get a notification and the app will turn greyscale, similarly to Bedtime mode if you use that. Once the timer runs out a toast notification will popup asking you to either change the timer or close the app IIRC. Bear in mind in either case the app will be killed hard, so all of your temp data (i.e. Lemmy comment in progress) will be lost.