Hello
in your script your are missing a closing double-quote
$tableName2 = "dbo.t_must_glory**"**
here is the full script. it should work
$tableName = "dbo.t_glory"
$tableName2 = "dbo.t_must_glory"
$SQLServer = "DB15","DB21"
$query = "C:\queryset\copy.sql"
$data = "select name from sys.databases where name like '%dam%'"
$dataset = Invoke-DbaQuery -SqlInstance $SQLServer -Database $data -Query $query -As DataSet
$dataset | Write-DbaDbTableData -SqlInstance 'DB6' -Database mesh -Table $tableName2