Disallow author with robots.txt

If you use Yoast SEO, you can go to Users > All Users, and in the Yoast SEO settings, check Do not allow search engines to show this author’s archives in search results. See this link.

OR

With robots.txt, you can add:

User-agent: *
Disallow: /author/*

OR

You can also add the robots meta-tag to the appropriate pages:

function custom_function_filter_wp_robots( $robots ) {
    if(is_author()) {
        $robots['noindex'] = true;
    } 

    return $robots;
}

add_filter( 'wp_robots', 'custom_function_filter_wp_robots' );