Yes, attraction sometimes comes back.
No, nobody can promise that it will.
That is the uncomfortable truth.
People often want a technique that guarantees desire if they communicate correctly, go on enough dates or create enough novelty.
Attraction is not a contract.
What you can do is understand why it changed and create conditions in which it has a fair chance to return.
Start with the reason it left
Different causes need different responses.
Stress and exhaustion. Desire may return when the body and mind have more capacity.
Resentment. The relationship may need repair before attraction.