Cmd+Z undoes text entry (in text inputs on websites and in the address bar) until it is at the end of undo history, then reopens closed tabs.
Cmd+Z only ever undoes text entry. It never re-opens a closed tab.
And/or this is an option, not baked in.
It is very unintuitive that a recently closed tab is reopened when repeatedly pressing Cmd+Z to undo changes in a text input. Reopening a closed tab is very out of context while typing.
The established and intuitive way to reopen closed tabs is Cmd+Shift+T (which is also a current shortcut in Orion).