Unable To Call Javascript With Enqueue

In WP jQuery works in compatibility mode by default. It means that the typical $ shortcut for jQuery doesn’t work, so it doesn’t conflict with any other JavaScript libraries that use the dollar sign also, like MooTools or Prototype.

So you should use jQuery instead of $ in your JS file.

Of course you can wrap the code in an anonymous function where you pass in jQuery to be mapped to $.

(function($) {

    // $ Works here!
    // console.log($);

})( jQuery );

You also have to add jquery as a dependency when you enqueue the script:

function myprefix_enqueue_scripts() {
    wp_enqueue_script( 'my-script', get_stylesheet_directory_uri() . '/js/custom.js', array('jquery'), true );
}
add_action( 'wp_enqueue_scripts', 'myprefix_enqueue_scripts' );

PS. I assume that your file is enqueued properly and it really is in your code.