Any better pagination logic?
Error handling You await inside an async function, but without a try/catch surrounding it. So, if Article.findAndCountAll rejects, you'll get an unhandled rejection (which is deprecated in Node) and no response will be sent.
Default destructuring and variable names
const { page } = req.params; // current Page
const { size } = req.params; // items per page
const limit = size || 5; 

simplifies to
const { page, size = 5 } = req.params;

and using the size variable. Though, if possible, change the param and variable name to itemsPerPage; it's much more representative of what the variable contains than size. currentPage would also be a bit more precise. Similarly, totalPage, since it contains a number, would sound better as totalPages.
Sorting bug You have:
navBarIndexArray.sort();

This will sort lexiographically, not numerically. For example, it could produce an output of
[1, 11, 2]

Compare numerically instead, eg .sort((a, b) =&gt; a - b).
Pagination Or, even better, just insert the indicies in order to begin with.
Your current results don't seem quite natural. When near the end, I'd expect the nav to be full of all nearby pages: eg, when on page 5 of 6, I'd expect 3 4 5 6, not just 4 5 6. Implementing this will require a bit of extra logic, though.
Rather than two loops which do something very similar, identify the last page to display in the nav, then subtract by navBarIndexLimit to identify the first page to display in the nav, then iterate over it. See comments in snippet below:


const navBarIndexLimit = 4;
// currentToLastPageOffset: Amount to add to current page to get last page
// (eg: current page 4 results in last page 6, first page 3)
const currentToLastPageOffset = navBarIndexLimit - 2;
const makeNavbarIndexArr = (currentPage, totalPages) =&gt; {
  const lastPage = Math.min(
    totalPages,
    currentPage &lt;= 1
      ? navBarIndexLimit - 1 // If on 0th or 1st page, set last page to 3
      : currentPage + currentToLastPageOffset
  );
  const firstPage = Math.max(lastPage - (navBarIndexLimit- 1), 0);
  // I prefer to create numeric arrays all at once with Array.from:
  return Array.from(
    { length: lastPage - firstPage + 1 },
    (_, i) =&gt; firstPage + i
  );
  // But you could also use a for loop and push if you find it easier to read
};
console.log(makeNavbarIndexArr(0, 9));
console.log(makeNavbarIndexArr(1, 9));
console.log(makeNavbarIndexArr(5, 9));
console.log(makeNavbarIndexArr(8, 9));
console.log(makeNavbarIndexArr(9, 9));
.as-console-wrapper {
  max-height: 100% !important;
}



Note that the above takes zero-indexed parameters and returns an array that's zero-indexed, though it's trivial to tweak it to be one-indexed instead if needed.
It's a reasonable amount of code, but the logic that needs to be implemented is somewhat complicated, so there's no avoiding at least some of it. While it could be condensed somewhat (for example, by removing the currentToLastPageOffset variable), that would make it harder to understand.
I highly recommend keeping the function in the snippet above - don't inline it into your page route, so as to clearly separate the calculation logic from the main route logic.
router.get('/?:page', (req, res) =&gt; {
    const { currentPage, itemsPerPage = 5 } = req.params;
    const offset = currentPage ? (currentPage - 1) * itemsPerPage : 0; // skip previous items
    Article.findAndCountAll({
        include: User,
        raw: true,
        nest: true,
        limit: itemsPerPage,
        offset,
    })
        .then((articles) =&gt; {
            const totalPages = Math.ceil(articles.count / itemsPerPage);
            articles.index = makeNavbarIndexArr(currentPage, totalPages);
            res.render('article/article_home.hbs', { articles });
        })
        .catch((error) =&gt; {
            // Handle errors, send error response
        });
});