The risk of buying first is financing, not just timing. A lender qualifying you while you still carry your current mortgage may cap what you can offer on the smaller home, and a bridge loan to cover the gap is an added cost most downsizers would rather skip.
The risk of selling first is a temporary move if nothing suitable is available when your house closes. Some sellers negotiate a longer possession date or a short-term rental to bridge a few weeks, and either beats being forced into a rushed purchase.
Which order fits depends on how firm your equity number needs to be and how flexible your timeline is. Get your hand-reviewed valuation from Joel Dyck.