Hussaen Kahachi The first step is to find a research gap that is relevant for someone (e.g., the industry or other academics) and neither too broad nor too small, so that you can tackle it with scientifc methods. My suggestion would be to ask an experienced researcher for advice (this will save you a lot of time) and then start with a systematic literature review (i.e., you collect and categorize all the relevant research around that topic).
for me, you can start with asking yourself questions :
1. what problems can I identify?
2. how I want to solve it? (or which part of the problem I want to solve?)
and then, you can start literature study about some relevant topics. you can check on researchgate and google scholar for some journal/proceeding papers.
In addition to what has been written above, I would add that the topic should be interesting to you. Chances are that you have to stick with it for a couple of years, so do not choose something in which you are not really interested.