Selling first means you know exactly what you have to work with, but it can mean a gap between possession dates where you need temporary housing or a short-term rental, which adds cost and disruption on top of two moves instead of one.
The exception is when the smaller place is a rare fit, a specific building, a specific street, that will not come around again, in which case some downsizers accept the risk of a conditional purchase or a possession-date overlap to secure it.
The right order depends on your equity cushion and how much disruption you can tolerate, not a universal rule. Get your hand-reviewed valuation from Joel Dyck.