Get all post types that supports tags

Please try this.

function get_post_tp(){
$args = array(
   'public'   => true,
   '_builtin' => false,

);

$post_types = get_post_types( $args, 'objects' ); 

foreach ( $post_types  as $key => $value ) {

  
  $postArray = json_decode(json_encode($post_types), true);

  $array_key = key($postArray);
  print_r($post_types[$array_key]->taxonomies); // here you can see in taxonomies post_tag is exist or not.
//if exist then push into array otherwise you can skip it.. 
//apply your logic here
   
}

}
add_action('init','get_post_tp');