Think about it. After you sell your home, you have the money in hand (not literally in your hand but in the bank) for the down payment on a house you want to buy. If you buy first, you have to find the money for a down payment, closing costs, etc., from somewhere besides the sale of your home. Even if you have the funds for the down payment, are you prepared to pay two mortgages until you sell?
Selling first is safer. Ideally, you will close on the sale of your home and have three days to move out. The next day, you will close on the purchase of your new home, which the sellers have already moved out of, leaving you an empty, squeaky clean, move-in ready house. This is possible, as long as the stars are aligned in your favor, and Jupiter is in retrograde (or is it Venus?). If it’s possible, a good agent can move the stars and planets around a little, and make it happen.
Unless you are buying new construction, or a home that the owners have moved out of, you can’t move in until the sellers of your new home move out. Remember, the sellers may have to wait until they close on their next home before they can move out. It is a lot of moving pieces but an experienced agent will help make your real estate transactions go through as smoothly as possible. You will be surprised by the galaxy rearranging powers of the best agents.