cotton onto

中高级 (B2)informal

To slowly work out what something means or what is happening.

"It wasn't long before the manager cottoned onto their scheme to leave early every Friday."