You can use this PHP code to get the post ID and create a condition to check it before removing the editor.
$post_id = null;
if ( isset( $_GET['post'] ) ) {
$post_id = intval( $_GET['post'] );
} elseif ( isset( $_POST['post_ID'] ) ) {
$post_id = intval( $_POST['post_ID'] );
}
the correct code will look like
// Remove the editor for a specific post. Change 'post' to your custom post type.
add_action( 'init', function () {
$post_id = null;
if ( isset( $_GET['post'] ) ) {
$post_id = intval( $_GET['post'] );
} elseif ( isset( $_POST['post_ID'] ) ) {
$post_id = intval( $_POST['post_ID'] );
}
if( $post_id == 1 ) {
remove_post_type_support( 'post', 'editor' );
}
} );