I was adding the custom CSS & JS using hooks and there was this error even I didn’t touch the wp-class-hook

The text in the second parameter is not code to run, it is the name of a function. That is why it does not and cannot work. The warning is PHP telling you that no function with that name exists. Or more specifically that is it an invalid function name.

A function with () in its name is not possible. For your code to work you would need a function named skfans_wp_enqueue_script() but that’s impossible because it would mean your function looks like this:

function skfans_wp_enqueue_script()() {

This would generate syntax errors and crash immediately.

To clarify the difference, this is what you believed it meant:

add_action('action/event name', 'run this PHP code inside these quotes when action/event happens');

What it actually means:

add_action('action/event name', 'A thing to call when the action/event happens' );

e.g.

add_action( 'save_post', 'wpdocs_my_save_post' );
function wpdocs_my_save_post() {
    // .....

Further reading: