Buying first gives you certainty about your next home and avoids a rushed move, but it means carrying two properties, or making an offer conditional on the sale of your current one, which some sellers in a hot market will not accept.
A bridge loan can cover the gap for a buyer with strong equity and a lawyer who can structure the short-term financing, though it comes with its own cost and requires the current home to already be under a firm sale agreement.
The right order usually comes down to how much cash cushion you have and how competitive the specific price band you are buying into actually is. Get your hand-reviewed valuation from Joel Dyck.