Hey you have to use the below logic to handle the above conditions, it will work.
if (!is_user_logged_in() && has_tag('private')) { ?>
<a href="https://wordpress.stackexchange.com/questions/368246/<?php the_permalink(); ?>" title="<?php the_title_attribute(); ?>">
<img src="<?php bloginfo('template_directory'); ?>/img/default-login.jpg" alt="<?php the_title(); ?>" />
</a>
<?php } else if( is_user_logged_in() && has_tag('private') ) {
// show the actual featured image
// check if the post has a Post Thumbnail assigned to it.
if ( has_post_thumbnail() ) {
the_post_thumbnail('news-thumb',
array('class' => 'news-thumb'));
}
//if you want to show the default image if featured image is not attached you can add here in else
}else{
?>
<a href="https://wordpress.stackexchange.com/questions/368246/<?php the_permalink(); ?>" title="<?php the_title_attribute(); ?>">
<img src="<?php bloginfo('template_directory'); ?>/img/default.jpg" alt="<?php the_title(); ?>" />
</a>
<?php
}