categories – How do I get the category terms (multiple) queried on a category page?

Here’s an example of a URL showing results from both the foo or bar category (note: I’m using pretty permalinks):

https://example.com/category/foo,bar

Based on this URL, and without parsing the URL itself, how can I get an array of the category terms used in this query?

I see them on the global $wp_query object here:

$wp_query->tax_query->queried_terms('category')('terms')

However, I’m looking for a more elegant way to retrieve them.