WordPress: get recent posts, delete the current category

Assuming you are using custom query to fetch the latest posts from other categories. In that case, you don’t need to hook into pre_get_posts as the category__not_in parameter can be passed directly into the query arguments.

//Get the current category ID
$catID = get_queried_object_id();

//Pass it to the Query arguments
$args = array(
    //Your other arguments here
    'category__not_in' => array($catID),
);
$excluded_posts = new WP_Query($args);

EDIT

function wpse_exclude_current_cat( $query ) {
    if ( !is_admin() && !$query->is_main_query() ) {
        if ( is_category() ) {
            $catID = get_queried_object_id();
            $query->set( 'category__not_in', array($catID) );
        }
    }
}
add_action( 'pre_get_posts', 'wpse_exclude_current_cat' );