Use 'the' with ordinal numbers because they point to a specific position in an order.
the + ordinal + noun
Do not usually use a/an with ordinals when you mean a specific position.
Is it the first/second/last...?
💡 Ordinals usually behave like definites: the first train, the second question. In some set phrases, 'next/last' often take zero article: next week, last year (see special cases).
✓This is the first time I’ve visited London.
✗This is first time I’ve visited London.
Ordinals typically need 'the'.
✓Take the second left.
✗Take a second left.
You mean a specific position in an order.
✓The last bus leaves at 11.
Last identifies a unique item in a sequence.