How can I integrate Fancybox 3 in WordPress properly

There should be no real problems doing it this manner, but there is a more correct way, namely using wp_add_inline_script, which is exactly meant for situations where you want to append something to a script file. You would use it like this:

add_action ('wp_enqueue_scripts', 'wpse302588_enqueue_add_script');

function wpse302588_enqueue_add_script() {
  $add_script = "jQuery(document).ready(function($){ .... });"; // your script as a string without <script> tags
  wp_enqueue_script ('fancybox-script', 'https://cdnjs.cloudflare.com/ajax/libs/fancybox/3.3.5/jquery.fancybox.min.js', array(), '3.3.5', true);     
  wp_add_inline_script ('fancybox-script', $add_script, 'after');
  }