You have a few options...buy a new headliner from one of the parts dealers. (ecklers,mad..ect) You can bring it to an auto top and upholstery shop. Or fix it yourself. I fixed it myself. The material is held affixed to a high-density board. The board on my car was held onto the roof panel with Velcro. Just slip a butter knife under a corner until you can get your hand inside to lift it up and out. Then what you need to do is pull the old material off the backer, just pull it off. You will most likely end up with the sponge type residue on the board, just take a wire brush and scrape it off.
Go to a fabric store (Joann Fabrics is one) and get a new piece of headliner material. You only need about a yard, and it comes with the new sponge attached. Take the fabric and place it on a flay surface. Lay the board on the fabric and cut the pattern out about two inches larger. Remove the board and spray it with 3M adhesive (see photo below) let it dry. Do this a couple or three times because the adhesive will soak into the board.
Get some help with this part....hold the material over the board and roll it onto the board. (be careful of wrinkles) Turn the board over and fold the edges onto the back. You can use hot melt, the 3M adhesive, or staples. That’s it.