Some scientists hypothesize that advanced civilizations may use methods such as radio waves, lasers, or even neutrinos to communicate across vast distances. However, the energy requirements and technological challenges involved in such interstellar communication are enormous, and there is no guarantee that advanced civilizations would have an interest or a means to initiate contact with Earth.
The question of how long an advanced civilization might try to communicate with us is also difficult to answer, as it would depend on many factors, including the nature of the civilization, its motives, and the limitations of its technology. It is possible that an advanced civilization might send out a single message and then wait for a response, or it might make multiple attempts over a long period of time. Additionally, it is conceivable that an advanced civilization might not even bother trying to communicate with us at all, if it considers us to be too primitive or if it has other priorities.
In summary, the duration of any attempted communication between advanced civilizations is subject to many uncertainties and cannot be accurately predicted based on our current understanding of the subject.