Screen Time adds up how much time you spend actively using your device. It also counts the time you actively spend in each app, so it won't count time when you are using a different app or not using your device. If you think that your Screen Time is wrong, you can try a different automatic time tracking app such as Timing.