Did you already check the condition of your ceiling? Because that matters a lot for the moldings to hold up.
The most important thing is using the right adhesive - look for a plaster-specific ceiling adhesive (like "cornice adhesive" or "plaster paste") that has good grip. Regular white glue won't work because plaster is heavy. Before gluing, clean the ceiling thoroughly with a damp cloth to remove dust and loose paint - that helps a ton. Apply the adhesive in lines along the molding, press down hard for several minutes, and let it cure completely (read the product instructions, it could be 24 hours or more).
If the molding is heavy or your ceiling is in bad shape, it's worth reinforcing with small mechanical anchors like screws or wall plugs. You can drill into the molding at strategic points without it showing and secure it with the adhesive too. Most people do this and sleep soundly 😅. If you're not comfortable with tools or the ceiling is really damaged, it's worth hiring someone who knows what they're doing - a molding on the floor is a mess and could hurt you if it falls suddenly. A professional charges a fair bit but at least you're safe.