Hi sreddy1111,
We appreciate you reaching out through Apple Support Communities for help with this message your're seeing about the SIM card in your iPhone. We'd love to point you in the right direction here.
Will it be possible to eject the SIM card and test it in another device, while also testing a different active SIM card known to be working properly in your iPhone 12 Pro Max? This will help to confirm if the issue is isolated to this specific SIM card.
We've got a helpful resource to share with you. Let us know if you've got any questions about this guide:
If you see 'invalid SIM' or 'no SIM' on your iPhone or iPad - Apple Support
Have a great day!