excludeCat function reverses order of blog posts

function exclude_category( $query ) {
if ( $query->is_home() && $query->is_main_query() ) {
    $query->set( 'cat', '-5377' );
    $query->set( 'orderby', 'date' );
    $query->set( 'order', 'DESC' );
    }
}
add_action( 'pre_get_posts', 'exclude_category' );

Use ASC or DESC for order.

Add code to child themes functions file.

Tested and works.