When to prefer maximisation of surplus and when instead to prefer minimising differences in price and q to find market equilibrium? Two alternative approaches to compute a market equilibrium (in static analysis) are either to minimize the differences (either using abs() or a quadratic diff) between supply-demand quantities and prices in a given market or maximise the total surplus.

Which are the advantages of these two approaches and when to prefer one over the other?

I noticed that many partial equilibrium models (e.g. 1, 2 (p 42)) use the max surplus method, but I wonder why.
Market Equilibrium occurs when the difference between demand and supply is minimized. Equilibrium price and quantity is determined by solving this problem.

Surplus Maximization (or efficiency) is a property that we would want equilibrium to have. First Welfare Theorem says that in competitive markets (in the absence of externalities) market equilibrium is surplus maximizing. In standard demand-supply framework, solving for equilibrium and efficiency yields identical outcomes, and that is why these methods are used interchangeably.