Assuming you have a triple.
1. Set cable tension so that front mech is centred on the middle ring.
2. Set L limit screw so that when the chain is on small front and large back there is 1mm clearance between inner cage and chain.
3. Set H limit screw so that when the chain is on large front and small back there is 1mm clearance between outer cage and chain.
4. Make a cup of tea, sit down and admire your setting.
You might find it easier to adjust the limit screws when the you are on the middle, it takes longer through trial and error but those screws are then not in compression and therefore easier to turn.
If either 2 or 3 are not achievable even with those screws completely backed out, you probably have a mech orientation (see
this) or chainline issue (wrong chainset/bb combination).