Hi @sp13test ,
Agree with trevorseward's suggestion, please register a SharePoint App in /_layouts/15/AppRegNew.aspx and use Client ID/Secret for authentication:
Connect To SharePoint Online Site With App Only Authentication
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.