How to check if a post has at least 2 terms from a custom taxonomy attached?

get_the_terms( int|object $post, string $taxonomy ).   

Use the above function to get the terms of the taxonomy. It will return the array of terms associated with the post. Then you can use the php function

$count = count( $array ).  

it will return the count of the terms. After getting the count use the if statement

if( $count > 1) { //do what you want }.  

error code: 523