What screws are used for the legs of this table?

Step 1: According to these two nuts, generally speaking, nuts are universal. You can measure the inner hole diameter of these two nuts. If the diameter of the inner hole is 6.7~7, it is M8 nut; If the diameter of the inner hole is 8.6~8.9, it is an M 10 nut.

Step 2: Know the nut specifications, and you can go to the hardware store to buy the corresponding screws. Of course, you have to choose the screw size. If it's too long, push it in. If it's not tight, it's too short, it's out of reach or the locking force is not enough.

Supplement: When buying screws, the standard saying is M8 or M 10 thread diameter, but the popular saying is 8 or 10. Look at your picture, the length is about 20 mm