My single.php page does not show the related data to the post which is clicked

This probably has to do with the custom query – it’s preventing other queries from working properly.

Setting a logo as a post seems an odd approach. Media attachments are already posts in and of themselves. Additionally, WP has a nice logo feature – custom-logo. I would add the logo that way and then just call the theme mod for the logo. That way you’re not adding an extra query that throws off other queries.

In theme’s functions.php:

<?php add_theme_support('custom-logo'); ?>

In theme’s header.php:

<?php the_custom_logo(); ?>