1. Improve your English level
Your main goal should be to improve your overall level of English.
Once you feel you have the right level, then you should focus on exam technique and preparing for the test.
You can check your level by finding an IELTS tutor (in person or online) and asking them to give you a mock test.
The big mistake many students make is to take the test to early with too little preparation.
They may have a band 5 level and think that with 1 month of preparation they will reach a band 7.
You can improve exam technique in 1 month, but you won’t improve your overall English skills by one band, let alone 2 bands in just one month.
Cambridge English recommends 200 hours of guided study to improve your English by one level on the CEFR. This is similar one band in IELTS (not exactly the same but similar) but it gives you an idea.
So take a general English course to get to the level you need first, then take an IELTS course to improve your exam technique
2. Do lots of Practice Papers
It is so important to get comfortable doing the test, and getting used to the timing and style of questions you will be asked.
So practice doing lots of past papers.
There are plenty of past papers on the IELTS website, the Cambridge English website and the websites by the British Council and IDP
https://ielts.idp.com/spain/prepare/article-free-practice-tests
https://www.cambridgeenglish.org/exams-and-tests/ielts/preparation/
https://takeielts.britishcouncil.org/take-ielts/prepare/free-ielts-practice-tests
You can also buy the Cambridge IELTS Authentic Practice Test
3. Take a Mock Speaking Test
I suggest taking a mock test with an IELTS tutor, you can find these on many online platforms like, italki, Cambly, Preply and others