get_the_terms, whether I should use string or array as the second parameter?

Going by the documentation it should only be string.

Notice this line $terms = get_object_term_cache( $post->ID, $taxonomy );

The get_object_term_cache( int $id, string $taxonomy ) always expects the second (required) argument to be a string, so if you pass an array as the second argument to get_the_terms you will get the Array to string conversion notice.

Second argument should always be a string, those example could be old and the function was probably updated in newer versions.

For further information I would check wordpress change logs in the versions, maybe there you will find this function with a second parameter that used to accept array as well as string.