Output an array of terms for a ‘tax_query’ => array()

if you need to turn it into an array of IDs then it is already an array of IDs, you don’t need to do any work on it, it’s already in the perfect form to go straight into the terms parameter

e.g.

    'terms' => $terms,

The only thing to be mindful about though, is that get_field is not a WordPress function, it’s an ACF function, and you will need to handle the situation where this field has no value or an error occurs. You will need to ask how to handle that in an ACF community or via their support as ACF fields are off topic here.