Use Microsoft Graph
Install-Module Microsoft.graph
Connect-MgGraph -Scopes "User.ReadWrite.All","Domain.ReadWrite.All"
Importing Bulk Domains to CSV
Import-Csv .\Export.csv | ForEach-Object {New-MgDomain -BodyParameter @{Id=$_.domainname}}
To get verification code for each domain
Get-MgDomain |ForEach-Object {(Get-MgDomainVerificationDnsRecord -DomainId $_.id | Where-Object {$_.RecordType -eq "Txt"}).AdditionalProperties.text}
run get-mgdomain put in a sheet, run this and put in the next column. Saves a lot of time.
What headers does the CSV need to have?