After failing a Microsoft Azure exam, you must wait 24 hours before retaking it. A 14-day waiting period is imposed between all subsequent attempts (up to 5). You may not take a given exam more than five (5) times within a 12-month period from the first attempt.
However, it is generally recommended that you take some time to review the exam content and understand why you failed the exam before attempting it again. This can help you identify any areas where you need to improve your knowledge or skills, and can increase your chances of passing the exam on your next attempt.