Most instructors are going to understand if it’s a one-off thing, especially if there are circumstances beyond your control.
I go to my lesson straight from work, it’s the last lesson of the day, and I really don’t have much extra time available if something out of the ordinary happens. If there’s an accident with stopped traffic or something, I’ll just send a message that I might be late. This has maybe happened twice in over a decade.
Or - as I experienced in college - I had one professor with a supposedly hard and fast rule that if you were late to/missed class, you got a zero for the day. Not normally a problem for me as I was always prompt and not the type to cut class. One morning my alarm genuinely didn’t go off and I slid in about 5 minutes late. After class I went up to apologize and he said “Don’t worry - that rule is not for you.”