Compliments can work.

It depends how you say the compliment.

If you sound uncertain and you hesitate it will not be attractive.

Also, if she’s not sure about your value, compliments work against you.

Because it simply tell her what she already thought. That she’s out of your league.

However, if she thinks you are too good for her it can help to compliment and validate her.