add_action() not working for admin

As noted in the documentation, the wp_enqueue_scripts hook (emphasis mine):

…is the proper hook to use when enqueuing scripts and styles that are
meant to appear on the front end.

If you want to enqueue scripts in the admin, you need to use admin_enqueue_scripts.