What structure should post_content have in the database?

Let me start off by saying that I have no WordPress experience at all so I may be asking a really stupid question. What I need to do is transfer a bunch of articles from a old MySQL database to a WordPress site.

Now I found wp_insert_post and I can get all the data from the old DB. The problem starts with the article images. In the WordPress DB there seems to be a <figure class="wp-block-image size-large"><img src="hard%20path%20to%20image%20here" alt="" class="wp-image-4066"/></figure> tag that points to the exact image. Problem is that it is surrounded by, what I would call strange comments, that look like this :

This id seems to be the ID of the image that is made a attachment type post in the same table. My question is are these comments necessary or can I just generate the tag ?