Don’t understand how to link Javascript files in WordPress

Please read this documentation https://developer.wordpress.org/reference/functions/wp_enqueue_script/
You need to set 5th parameter to true so the javascript is loaded in the footer.

wp_enqueue_script( 'tyc_scripts', get_theme_file_uri('/js/tyc_scripts.js'), array(), false, true );

if the issue still persists please add your js code inside jquery document.ready()