There are various types of edible glue; such as royal icing, gum paste/water mixture, melted chocoloate, piping gel etc. Which glue you choose depends on each individual project. I would use royal icing to fasten the pieces of a gingerbread house together, for example, as it tends to be a strong adhesive. My favourite type of sweet glue is made with tylose powder. I've adapted
Baking Beauty and Beyond Gum Tragacanth Edible Glue Tylose Tylo
Homemade Jewelry Cleaner - Make Your Own Jewelry Cleaner
How to Make Fondant Sugar Glue
How to Make Edible Glue for Gumpaste & Fondant Embellishments : 4 Steps - Instructables
Make Your Own DIY Edible Glue Stick – Super Naturale
How to make your own Edible Glue - Ginger Gingerbead Lady
Tylose Glue Recipe - My Cake School
How to Stick Fondant to Fondant - A Guide to Edible Glue
How to make edible sugar glue - Love Cake Create
Easy Edible Glue or Paste Recipe for Toddlers and Preschoolers
How To Make Portable, Easy-to-Eat, Toddler-Friendly Wraps with
Edible Glue Just A Pinch Recipes
How to Stick Fondant to Fondant - A Guide to Edible Glue
How to Make Edible Glue for Next-Level Cake Designs