On your staging site, you need to start by deactivating all your WordPress plugins and then check if it fixed the 'Add Media' button. If it does, then this means one of the plugins was causing the issue. You can now activate the plugins one-by-one, and after activating a plugin check the 'Add Media' button.