The process of building custom applications and tools that interact with Microsoft SharePoint, including SharePoint Online in Microsoft 365.
Thank you for posting your question in the Microsoft Q&A forum.
From the error message, I found this article that might help.
Error when you try to import a term set into SharePoint Online - SharePoint | Microsoft Learn
To import large term sets (more than 5,000), please use the Client-Side Object Model (CSOM).
You can use this PnP PowerShell cmdlet to do it.
powershell/documentation/Import-PnPTermSet.md at dev · pnp/powershell · GitHub
I hope this information helps.
If the answer is helpful, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".
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.