I actually knew someone who worked in rural development where this was an issue (and to his orgs credit reduced child marriage rates a lot).

Both happen at the same time, it's not one causes the other or smth like that. When families struggle with money, marrying girls off reduces their costs. Married boys remain with the family and actually bring someone new into the household, increasing costs or keeping stable if the boy works. Even in cultures where women pay dowries to marry, the ROI could be worth it if you reduce household costs every year going forward and your manual labor work has little chance of growing your income significantly.

Putting a kid through, even free school, costs money and at rural poverty levels in the Global South it's similar to a huge car payment one can't afford. Marrying the kids off is like ending that payment (if they go to live with another family which only girls do)