There is no determined period for getting off alcohol, but the longer you stay without drinking, the better you will be able to stay off the alcohol.
When you have recently stopped drinking, you think about it very often, but these thoughts disappear gradually. It is hard to say how long that will take. It's personal, but it is clear that having your life in order certainly helps. Not being dependent on alcohol means, among other things, that you are not looking for the effects of alcohol anymore. People who drink a lot get used to alcohol. They need more each time to still feel the effects. To stop drinking breaks off that habituation, but if you start drinking again, you redevelop it very quickly. Furthermore, people who have drunk a lot and for a long time may suffer to a lesser or greater extent from a loss of control. This means they can't stick to the deal they made with themselves to only have a certain number of drinks. The first drink sets off a chain reaction, which makes the person eventually drink more and more. When you suffer from a loss of control, you can simply not drink moderately anymore. A condition for being able to drink alcohol again is that you don't need the effect of alcohol anymore, and that you don't have a loss of control. You only drink for the taste and can stop after 2 to 3 drinks during certain events. So you may ask yourself if it is worth it to start drinking again.
In many cases, after an alcohol-free period, people want to drink alcohol again. This can have several reasons: stress, don't see alcohol as a threat anymore, feel that you are back where you started when you have used again.