A little before, the rest after, is the approach that serves most people best. Carrying a modest amount of local currency on arrival means you can pay for a taxi, a SIM card, or a meal even if the airport ATMs are down or your card gets blocked, which happens more often than you would think. Think of it as insurance, not your main money supply.
Exchanging large amounts before departure rarely makes sense. Rates at home for a foreign currency are often mediocre, some currencies are hard to obtain abroad at all, and carrying big cash sums through airports is both risky and subject to customs declaration limits in many countries.
Once you land and settle, ATMs with a good card, local banks, and digital transfer services will nearly always beat whatever rate you got at home.