Re: "connects with Macbook pro and disconnects.
Not sure why it disconnects immediately."
Which MacOS is installed: Eg: The latest AirPods Max article from Apple Support:
Connect and use your AirPods Max - Apple Support
Says
"AirPods Max connect with Mac with macOS 11.1 or later"
_____________________
For disconnection issues, see how to:
Resolve Wi-Fi and Bluetooth issues caused by wireless interference - Apple Support
______________________________________
Re: "having issues connecting or switching between my iphone and iPad":
You might want to check that you are only connecting AirPods to one device at a time. (Eg may not be switching between multiple devices.)
See if turn off / turn on bluetooth helps
and / or
See how to: Switch your AirPods to another device - Apple Support for tips.
About firmware updates for AirPods - Apple Support
says
AirPods Max: 6A300 is the latest version ... requires the latest MacOS 14 Sonoma, latest iPadOS 17, or iPhone iOS 17 version to update automatically.