Version of jQuery In WordPress Failing Security Audit

You can add the following in your functions.php file to deregister the old included jQuery and register the new jQuery.

Using a newer version of jQuery might make some plugins stop working, so you’ll have to check to see if all your plugins will work with the newer version.

function mytheme_register_scripts() {
    wp_deregister_script( 'jquery' );
    wp_register_script( 'jquery', 'https://ajax.googleapis.com/ajax/libs/jquery/3.5.1/jquery.min.js', array(), '3.5.1', true );
}
add_action( 'wp_enqueue_scripts', 'mytheme_register_scripts' );