How to Get The Taxonomy Term in Custom Post Type Loop Inside a Wp Query

while ( $loop->have_posts() ) : $loop->the_post(); 
//Edit Width post type
$categories = get_the_terms(get_the_ID(), 'services');
$separator=", ";
if ( ! empty( $categories ) ) {
foreach( $categories as $category ) {
echo '<a class="cat_item" href="' . esc_url( get_category_link( $category->term_id ) ) . '" alt="' . esc_attr( sprintf( __( '%s', 'your-themes' ), $category->name ) ) . '">' . esc_html( $category->name ) . '</a>' . $separator;
}
}
endwhile;

You can try in loop

More in: https://developer.wordpress.org/reference/functions/get_the_terms/

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)