Site icon Hip-Hop Website Design and Development

How to make JQuery load on top of head tag before everything

my website and plugins insert some jquery code between HTML tag and also whatever I do to insert jquery as a first script in the head section I can’t get it to work

I tried

function use_jquery_from_google () {
    if (is_admin()) {
        return;
    }

    global $wp_scripts;
    if (isset($wp_scripts->registered['jquery']->ver)) {
        $ver = $wp_scripts->registered['jquery']->ver;
    } else {
        $ver = '3.1.4';
    }

    wp_deregister_script('jquery');
    wp_register_script('jquery', "//ajax.googleapis.com/ajax/libs/jquery/$ver/jquery.min.js", false, $ver);
}

also putting

<script
  src="https://code.jquery.com/jquery-3.4.1.min.js"
  integrity="sha256-CSXorXvZcTkaix6Yvo6HppcZGetbYMGWSFlBw8HfCJo="
  crossorigin="anonymous"></script>

directly into header.php and index.php of theme
but I got no success

so what can I do to make Jquery load really before everything
because editing third party plugin is really frustrating and time-consuming

UPDATE