The risk is timing: if your sale possession date lands before you have a confirmed next home, you may need temporary housing or a short-term rental while you look, which adds cost and disruption to what should be a simpler move into something smaller.
Buying first avoids that gap but usually requires either enough savings to cover both a down payment and a bridge, or a lender willing to qualify you on two properties briefly, which is a higher bar for financing approval than selling first.
For most downsizing sellers, selling first and negotiating a longer possession date to shop is the lower-risk sequence. Get your hand-reviewed valuation from Joel Dyck.