Thanks for asking.
An easier alternative to integrate Tawk.to to your website would be to use there official WordPress plugin. I am sharing the relevant links that you can take a look.
However, if you would like to go with the JS code option, then please add following code in child theme function.php file:
add_action( 'x_before_site_begin', 'chat_script' );
<!-- chat_script code here -->
You can use following resources to download and setup child theme.
Download Child theme from following source: https://theme.co/apex/child-themes
Please take a look at following article to setup child theme: