Owners of Magento 2 stores frequently gather client information for a variety of reasons, including marketing, studying consumer behavior and purchasing patterns, or just providing a better user experience.
While registering with a Magento 2 store, additional information about the consumers is collected, including their email addresses. Every store owner typically verifies if the provided email address is accurate or not.
However, if you programmatically log in to a client without a password, the customer can still log in even if the email is not confirmed. In this circumstance, you must programmatically check if the customer account is confirmed or not Magento 2.
For a method to programmatically check if a customer account is confirmed or not in Magento 2, Visit : https://meetanshi.com/blog/programmatically-check-if-customer-account-is-confirmed-or-not-in-magento-2/