How to set post to draft and not publish if the_content contains certain words?

Something like this?

// You'll want to programmatically get the post ID
$post_id = 1; 

// Get the posts' content
$post_content = get_the_content(null, false, $post_id); 

// Using stripos() is case-insensitive to check for your phrase
if(stripos($post_content, 'specific words') !== false) {

    // Sets the post's status back to "draft"
    wp_update_post(array(
        'ID' => $post_id,
        'post_status' => 'draft'
    ));

}