Not sure what script you have been playing with, but getting the list is pretty straightforward via the Graph API: https://learn.microsoft.com/en-us/graph/api/bitlocker-list-recoverykeys?view=graph-rest-1.0
If you prefer doing it via PowerShell, you can use the Graph SDK for PowerShell and the following cmdlets:
Connect-MgGraph -Scopes BitLockerKey.Read.All
Get-MgInformationProtectionBitlockerRecoveryKey -All