The rearview mirror is attached to a support which is secured to the windshield glass. This support is installed by the glass supplier using a plastic-polyvinyl butyl adhesive.
Service replacement windshield glass has the mirror support bonded to the glass assembly.
Service kits are available to replace a detached mirror support or install a new part. Follow the manufacturer's instructions for replacement.