Das Einzige, das zählt, ist dein Glück.

English Translation

The only thing that matters is your happiness.

Any way to tell that this sentence isn’t referring to ‘your luck’?

No, without context, it’s impossible to know whether “luck” or “happiness” is meant.

A more natural phrasing would be:

“Das Einzige, das zählt, ist, dass du glücklich bist.”