Sometimes, while running a command in Magento 2, "indexer re-index required" error is faced.
It is because of an issue in Magento 2 table. The table might have been corrupted in the database where it existed but something was missing.Check the solution at https://meetanshi.com/blog/fix-indexer-reindex-required-error-magento-2/