Demo how to migrate content to Sitecore XM Cloud / Sitecore XP from WordPress or Umbraco or basically any CMS that can export the data to a usable format like a JSON file or provide a usable API. By using the The Sitecore RESTful API for the ItemService
The code works also for Sitecore XP but you need to adjust the template GUID and the template models to fit.
See: Migrating Your Content Seamlessly: A Comprehensive Tech Guide from WordPress to Sitecore XM Cloud
Although the Restful API is legacy and the Sitecore GraphQL API is preferred, its simplicity makes it suitable for one time tasks.
See Sitecore-GraphQL-Import for the GraphQL API