Wrong category nice name is displayed on archive page

The reason why your function is not working as it should is because it is getting the category of the last post loaded in the loop i.e The current post ‘PS4 Pro Glacier White Destiny 2 Bundle Announced’. I’m guessing the post is in two categories ps4 and destiny-2.

To customise the current category you can create a new template named category-slug.php (see category templates codex link below) specifically.

Alternatively, you can use get_queried_object() which will return the current queried object (or null) see codex link below for this function also.

You can use code similar to this:

function wpse_273435_check_current_category() {
    $term = get_queried_object();

    if($term !== null) {
        $term = $term->slug;

        if('your-cat-slug' === $term) {
            //do your thing
        }
    }
}

or if you’re in category.php you could do it without the function and conditionally load a template part using get_template_part() and load a different template part based on the current category being queried.

https://developer.wordpress.org/reference/functions/get_template_part/
https://codex.wordpress.org/Category_Templates
https://codex.wordpress.org/Function_Reference/get_queried_object