I mean, you could use an adhesive to lock it all down, but if it were me, I'd replace the whole thing.
https://www.amazon.com/Right-Passenger-Side-Power-Mirror/dp/B0BCNXKN8W?source=ps-sl-shoppingads-lpcontext&ref_=fplfs&psc=1&smid=A3I1NANZZ4RHRY