This happend to me in another car due to age. Most auto parts stores sell headliner specific sprays.
Just make sure to clean both surfaces as much as possible and note if it's contact glue, meaning you have to let both dry before you touch them together. Try to stretch it out too. If the rest of the headliner is bad, then it might be worth it to remove it all and just get a replacement headliner.