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