I think you'd better go to the eyeglasses store and ask for the clerk to help you do the repair work. Usually, the repair work is free because it belongs to the after-sale service. If you buy the eyeglasses online, you can give the common price for the repair work. Find the nearest eyeglasses store and repair it. Wish you good luck.
It is very difficult to repair broken frames yourself. Ask your optometrist if there is a company in your town that repairs frames and price them out. They usually cost little money and they do a pretty good job.
You have to find out why your metal glasses frame is broken. Firstly, you should exam whether the hinge break off, if so, you should cover the tips of a pair of pliers with masking to avoid scratching the frames, and use the pliers to bend the hinge back into its position. Another possible cause is your screw is loose, you could tight it with a specific glasses screwdriver. Or if the screw is lost, you can replace a new one and tight it on the frame. Additionally, if the metal hinge has broken off the frame, you could wash the surface to remove any paint or old glue. You can use fast-bonding glue and hold the pieces for one minute to allow the glue to dry.