@Mishra, Aanchal, Thanks for posting in Q&A.
From your description, I know you want to unenroll your device from your previous company.
For the error message, it means the device is still managed by the previous tenant. To unenroll the device, the general step is contacting your previous company Intune admin to retire or delete the device in both Intune and Microsoft Entra portal.
https://learn.microsoft.com/en-us/mem/intune/remote-actions/devices-wipe#retire
On device side, we can also unenroll the device via company portal.
https://learn.microsoft.com/en-us/mem/intune/remote-actions/devices-wipe#manually-unenroll-devices
Moreover, here are other methods you can refer to.
For iOS device, here is the method you can refer to.
Setting>General>VPN & Device Management
Remove the account from there.
Hope above information can help you.
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.