My custom query not detecting the correct category

in your code, you are checking the category of a post which is quite random outside of the loop and when the posts have more than one category;

the category ID of a category archive page is usually:

$cat_ID = get_query_var('cat');

techhipbettruvabetnorabahisbahis forumueduedusedueduedueduseduedueduedus