Farmers can produce a lot of food. They have a surplus so they can have a steady balance of food. Hunters and gatherers can't have a surplus so they don't always have a steady food supply all year.
Farmers can have many children because they have a surplus of food. Even if hunters and gatherers wanted to have many children they wouldn't be able to because they wouldn't be able to feed them.
Because farmers produce their food they don't have to move. Farmers don't have to move so they take up less space. Hunters and gatherers who hunt for their food have to move when food gets scarce.
Hunters and gatherers have to hunt for food so they have to work all day. The farmers can spend some their time farming and use the rest of their time to become a toolmaker, a builder, a fisher, a craftsperson, a priest, leader, etc.
These four ways prove that between farming and hunting & gathering farming has an advantage.