INVALID_SESSION_ID This session is not valid for use with the API in Salesforce

For API and integrations, MFA is not required. Check the following Article.

1. Disable "Multi-Factor Authentication for API Logins" and check. Disabling this option should resolve this exception.
2. Do not use "High Assurance" in the Profile Session Settings.

Before the Multi-Factor Authentication for API Logins permission takes effect, users must access Salesforce through the UI and complete MFA using Salesforce Authenticator or a third-party authenticator app. After users have completed MFA through the UI, they can use time-based, one-time passwords (TOTPs) from the app for MFA for API logins.