GNOME 48 introduced “Wellbeing” settings panel, allowing to monitor and limit screen time usage. It also has Break Reminders
options that can remind user to take a break in given time interval.
If you like this feature, but running on old GNOME (e.g., Ubuntu 22.04 and Ubuntu 24.04) or other desktop environments, then there’s a good alternative app called SafeEyes that can project your eyes by reminding or forcing to take a break!