Lenders will also look closely at whether you qualify to carry both a current mortgage and a new one at the same time, even briefly, and that qualification test is often the real limit on buying first, not preference.
Selling first removes that financing risk and tells you your true equity before you commit to a price on the next home, at the cost of a possible gap in housing if the timing does not line up perfectly.
This decision comes down to your mortgage qualification and your equity, not which order feels more comfortable. Get your hand-reviewed valuation from Joel Dyck.