There's no single right answer, because you're timing two different markets at once — the one you're leaving and the one you're entering — and they don't always move together. Selling first gives you a known budget and a stronger, non-contingent offer, but it can leave you renting or moving twice. Buying first lets you settle before you sell, but it means carrying two properties for a stretch and, often, a contingent or bridge arrangement.
Mountain inventory can be thin and seasonal, which affects how long a search realistically takes. The honest approach is to map your own financing, your timeline, and current conditions in both markets before you commit to an order — I won't quote you rates or price movements here, because those change constantly. Talk it through with your lender and with me before you decide.