posts – Notification when visitor is on specific WordPress Article

I am desperately attempting to find a way to get an alert when a specific article on my WordPress is visited (and no, I will not be flooded by emails, the code will be used temporarely) Being new to php, I used this code, but the site gets a critical error if I put it into the functions.php?

 function email_alert() {
        wp_mail( '', 'Alert', 'This Site was Visited!' );

    add_action( 'wp', 'email_alert' );

please help/advice, a big thank you!