When attaching the leg, you should first consider whether you want to screw holes into the tabletop or not. This creates different possibilities for fastening the legs, such as screwing or gluing.
The legs should be attached evenly to all corners of the table so that it can be more stable. In the end, use a spirit level to check that the table is straight.