<?xml version="1.0" encoding="UTF-8"?>
  <urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">
    <url>
      <loc><%= root_url %></loc>
      <lastmod><%= @articles.first.updated_at.strftime("%Y-%m-%d") %></lastmod>
      <changefreq>monthly</changefreq>
      <priority>1</priority>
    </url>

    <% @articles.each do |article| %>
      <url>
        <loc><%= article_url(article.slug) %></loc>
        <lastmod><%= article.updated_at.strftime("%Y-%m-%d") %></lastmod>
        <changefreq>monthly</changefreq>
        <priority>1</priority>
      </url>
     <% end %>
  </urlset>
<?xml version="1.0" encoding="UTF-8"?>
  <urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">
    <url>
      <loc><%= root_url %></loc>
      <lastmod><%= @articles.first.created_at.strftime("%Y-%m-%d") %></lastmod>
      <changefreq>monthly</changefreq>
      <priority>1</priority>
    </url>

    <% @articles.each do |article| %>
      <url>
        <loc><%= article_url(article.slug) %></loc>
        <lastmod><%= article.created_at.strftime("%Y-%m-%d") %></lastmod>
        <changefreq>monthly</changefreq>
        <priority>1</priority>
      </url>
     <% end %>
  </urlset>

Use created_at instead of update_at.
fix: Use created_at instead of update_at.
