Yes if I woke up 2 hours later for work then I would still go to work.
If I didn't go to work and didn't call in as late then I could lose my job and jobs are hard to come by now so if you're late by 2 hours for work then you should let your boss know that you're gonna be late and still go.
But if you're late to work too often then you could get fired so don't make it a habit and make sure to get to bed soon enough that you can wake up and go to work on time.
If you're 6 hours late then you should call in and probably stay home or show up and work the rest of the day.
Then show up on time the next day and the rest of the time if possible.