"Should I buy first or sell first?"
This is a regular question that comes up when people are planning to move, and there is both selling and buying involved.
Many real estate agents will automatically say "sell first", because that is the way they have been trained - just get the listing. But I don't think the answer is that clear cut and can depend on your situation.
There are some definite advantages to selling first. You will know exactly how much money you have from the sale to use as a down payment. And you will not have to include any conditions on selling your property when you make an offer to purchase. This can sometimes be the one negative that gets you beat if there are competing offers on the table.
The big drawback to selling first is that the pressure is on you and the clock is ticking. If, for whatever reason, you don't find a property in time then you may find yourself forced to rent for a while. This is certainly not the end of the world, but not everyone is okay with that outcome. And you may find yourself paying more than you might like or settling for something less than what you had in mind.
The market conditions can play a big role in how you proceed. If you are in a strong sellers' market, it will be easy for you to sell, theoretically making the condition on sale less of a concern. But at the same time, the sellers you want to buy from may be more reluctant to accept the condition because they know the market favours them. Then you are faced with the difficult decision as to whether you want to commit to buying without having your house sold and no condition to protect you. (I don't recommend it, no matter how confident you are you can sell)
If you are buying in a buyers' market, then it might be easier to pitch a condition on sale on your purchase. You just won't want to be highly speculative on your pricing to sell, or you might find the other side being less cooperative about extensions.
As always, I strongly advise discussing your strategy with a real estate professional you can trust. And if you are going to list and sell first, you should at least be looking in the market before that happens to make sure you are seeing properties that meet your needs in your affordable price range.