how to add datas in taxonomy to post with wp_insert_post

post_category expects an array of term IDs, not a string/term slug

$news_term = get_term_by('name', 'news', 'category');
$term_id = $news_term->term_id;

Now use the terms ID not its slug/name in your query args.

'post_category' => array($term_id),

error code: 523