Cannot get custom javascript to execute on page

Try this.

add_action ( 'wp_head', 'custom_script_hook');
function custom_script_hook() {

?>
<script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/3.2.1/jquery.min.js"></script>
<?php 

    $output="<script>
        jQuery(document).ready(() => {
          $("div#tm-extra-product-options").click(() => {
            console.log("it working!")
          });
        });
        </script>";
    echo $output;
}