It depends on your market and circumstances.
If you are able to buy the next house without the immediate need to sell your current one, it really doesn't matter. I would always choose to buy the next house and then move out of the current one so I don't have to deal with keeping my house showing ready if I could.
If you have to sell your current house, to buy the other, you would be best served to put your house on the market before you start looking but you need to have a plan in place for what you'll do if your house sells before you find something else like a short-term rental or someone who will let you stay with them for a bit.
The reason for this is that you'd be making any offers contingent on the sale of your current house and it puts you in a stronger position if you're already actively marketing your home vs. someone who isn't.
Bear in mind that a house sale contingency can be detrimental in a hot market though. If you can afford to avoid it, it's best to do so.