This page redirects to an external site: https://developer.wordpress.org/reference/hooks/wp_trash_post/
Run actions when a post, page, or custom post type is about to be trashed. The post ID is passed to the action hook.
add_action( 'trash_post', 'function_to_run_on_post_trash' );
function function_to_run_on_post_trash( $post_id ) {
// trash a related post or fire notice
}