wp_enqueue wont work on some files?

That isn’t how functions.php works in WordPress.

The functions.php in your theme root directory is loaded into WordPress environment by default as long as your theme is activated. It’s used as a plugin to add features and functionality of your theme to WordPress. You should take a look at theme functions and including css & javascript for more info.

Besides that, the wp_enqueue_scripts hook is fired inside the get_header() which happens before you can require('Lib/dynamic-table/functions.php').

You can fix that by require('Lib/dynamic-table/functions.php') inside the functions.php in theme root directory.