why the wp_register_script doesn’t work for register_activation_hook

Whatever is hooked to activation runs in just a single request when the plugin is activated in a sandbox, and the output is captured to check for errors. Your code won’t run on any subsequent request after that single activation, so your script will not be registered. It works on init because that action runs on every request.