Elmer's is the safest storebought glue you can get in my experience
Keep in mind that just because something says non-toxic does not mean it is non-toxic to hamsters,as humans are very different in terms of what is toxic to them compared to what is toxic to hamsters.However,this is one of those cases where it is a product that is completely fine to use