Two paths
If you can qualify carrying both payments, you can buy first, move at your own pace, and sell an empty house that shows well. It costs more in the overlap and buys a great deal of calm.
If you cannot, you sell first and either negotiate a rent back from your buyer, arrange interim housing, or write an offer contingent on your sale, which is weaker in a competitive market.
See how short-term financing lets you buy before your current home sells.
Sequencing the dates
Same day back to back settlements are possible and are also the tightest arrangement in real estate. Any delay on the sale side cascades into the purchase side.
Where possible, schedule the sale first with a few days between, or negotiate possession terms that give you a buffer. Movers, utilities, and school calendars all appreciate the margin.
Costs that appear in the middle
Overlapping payments, storage, short term housing, two sets of utilities, and the movers themselves. Budget the transition as its own line item rather than assuming the sale proceeds absorb it.