Hi @THM THM ,
For SharePoint Online MFA enabled Tenant, it's suggested to use App-Only authentication with CSOM code to connect with SharePoint Online list:
Connect To SharePoint Online Site With App Only Authentication
For building the custom web API to connecting with SharePoint Online, here is a complete example for start:
Building a Custom Web API for use with SharePoint Online
If an Answer is helpful, please click "Accept Answer" and upvote it.
Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.