If you didn't get the IELTS score you wanted, you can apply to retake the test as soon as you feel ready. However, before you apply for a retake, you need to keep in mind that your score is unlikely to improve without a significant effort to improve your English.