How do you get rid of a moonroof

What car do you have? I think all a body roofs have a compound curve. I would use a piece from a donor car with a similar roof contour, flange the edges of the patch panel to overlap the hole and install from below. Maybe a Camaro or something has a similar curve? Definitely replace any structural bracing with parts from a donor car of the same body as yours. You might need one or more headliner bows also.