I have code which creates an artice from JSON.
$article = $node_storage->create([
'type' => 'article',
'title' => $json['title'],
'field_int100' => $json['int100'],
'field_text100' => $json['text100'],
'body' => $json['body'],
]);
$article->save();
By default, the text format is Plain Text. Modifying the code which specifies the value of the body field will import the text with HTML formatting.