Check the notice terms in your contract. This will be under a heading "Termination" or "Determination".
Call the agent and say you wish to give notice with immediate effect, that you are withdrawing your instructions for them to sell your home.
Make a note of who you told. Then confirm this in writing, keeping a copy of your letter.
You don't have to give any reason. If they ask you can simply say the circumstances have changed. If they press you: "sorry I'm not prepared to say".
If you are going to instruct another agent, be careful that any sale the new agent brings you is not within the notice period of your agreement with the first one. If they had a sole seller contract with you they could claim commission on the sale. And the second agent would also claim commission..
The same would apply if you found a buyer yourself within the notice period.
The first agent could claim commission on the sale even though they had done nothing to merit it. The best policy is to wait completely until the notice period is complete.