Too few arguments – wp_login action

The custom role needs the read capability to view the backend.

Example:

$your_role = get_role('your_custom_role');
$your_role->add_cap( 'read' );

See: https://wordpress.org/documentation/article/roles-and-capabilities/#read

Ideally, this should only be done once, e.g. when activating your plugin or theme.