Digital Wellbeing is an Android application that tracks application usage. This application is now installed by default. Most devices running Android 10 and higher have Digital Wellbeing. According to Barak Goldberg, the Pixel is one of the only devices to have this application on Android 9 - 12.1 Everything from starting an app, stopping it, pushing it to background and bringing it into focus are tracked in the USERDATA/data/com.google.android.apps.wellbeing/databases/app_usage. The user leverages this file to see where they are spending time and to configure how frequently and when they are bothered by their installed applications. Digital wellbeing also keeps track of web history on Chrome. Web history is not captured by default; user has to enable this feature.
Josh Hickman released research and his blog on Digital Wellbeing, which has been implemented into ALEAPP. This blog can be read here: https://thebinaryhick.blog/2020/02/22/walking-the-android-timeline-using-androids-digital-wellbeing-to-timeline-android-activity/. Physical Analyzer and AXIOM also parse this artifact.
This directory also stores the following databases, which may be of interest:
bedtime
Sleep_detection
App_config
Two different locations between the Pixel (vanilla Android) and Samsung
Pixel: USERDATA/data/com.google.android.apps.wellbeing
Samsung: USERDATA/data/com.samsung.android.forest
Other OEMs may have their own variation of this function
Time limits
Samsung = ~7 days
Pixel = ~30 days
Reference:
[1] https://for585.com/wellbeing