Getting categories of posts under a custom taxonomy

Welcome to WPSE. I believe you are looking for the get_terms() function. This will return all of the terms for a particular taxonomy, and not the posts.

Pass your taxonomy slug in the array of arguments and set the hide_empty to false so you get a complete list, like this:

$terms = get_terms( array(
    'taxonomy' => 'taxonomy_1',
    'hide_empty' => false,
) );

Full documentation can be found code reference: https://developer.wordpress.org/reference/functions/get_terms/