In most cases, you'll simply have to delete your Wizarding World Pottermore account if you want to retake the quiz. This can be done by logging into your account and clicking on the house symbol at the top right of your screen.