How to customize WordPress login errors

Type the following code snippet in your functions.php

add_filter('login_errors', function () {
    return __('Access Denied!');
}, 99);