That depends on your circumstances. To qualify for a mortgage needed to buy a new home, most home sellers must first sell their existing home. In most cases, home sellers sell their home and simultaneously buy their new home; or they sell their home first and then buy a new home afterward.
If you can qualify for the new home without selling your current home, you may be responsible for paying two mortgages at the same time. But, you will have a lot more flexibility around the close date for buying or selling, the time to get the best results when selling, the benefit of making a non-contingent offer on your new home, and the timing and transition from your current home into your new home.