wp_set_object_terms( $vid, ‘0’, ‘priorities’); does not update (initiate) the taxonomy

According to this change, in version 6.3 WordPress was updated to support emptying the terms assigned to a post by passing an empty value in a way that won’t cause an error in PHP 8.1+. PHP treats ‘0’ as empty, so your code is treated as setting no terms on the post.

If you want the previous behaviour you should pass an array with '0' as the only value:

wp_set_object_terms( $vid, array( '0' ), 'priorities'); 

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