How do I apply loop into node twig template?
I would use code similar to the following one.

&lt;div class="blog-main-content"&gt;
  {% for key, item in content.field_article_main_content %}
    {% if key == 0 %}
      &lt;figure&gt;{{ content.field_article_main_content[key] }}&lt;/figure&gt;
    {% else %}
      &lt;p class="intro-pera"&gt;{{ content.field_article_main_content[key] }}&lt;/p&gt;
    {% endif %}
  {% endfor %}
&lt;/div&gt;


If it happens that some values of key start with #, then I would use the following code.

&lt;div class="blog-main-content"&gt;
  {% for key, item in content.field_article_main_content if key|first != '#' %}
    {% if key == 0 %}
      &lt;figure&gt;{{ content.field_article_main_content[key] }}&lt;/figure&gt;
    {% else %}
      &lt;p class="intro-pera"&gt;{{ content.field_article_main_content[key] }}&lt;/p&gt;
    {% endif %}
  {% endfor %}
&lt;/div&gt;