Using wood glue directly on drywall is not recommended. Wood glue is designed to bond wood surfaces together, and it is not suitable for use on drywall. Drywall is made of gypsum and paper, and its composition is different from wood.
If you need to adhere something to drywall, it is best to use an appropriate adhesive specifically designed for drywall applications. There are various types of adhesives suitable for attaching items to drywall, such as construction adhesives, wall anchors, or adhesive hooks. These products are specifically formulated to work with drywall and will provide a much stronger and more reliable bond than wood glue.
Always follow the manufacturer's instructions and recommendations when using adhesives with drywall to ensure proper application and a secure attachment. If you're unsure about which adhesive to use for your specific project, it's best to consult with a professional or someone experienced in construction and home improvement.