Law needs to create a Room (either a normal one or a K-Room) and then perform a hand movements or a slash with his sword to actually incap of kill him. Meanwhile, Thanos just needs to rise his hand and snap his finger, which is far faster.
On top of this, I might be wrong but we never sees him actually using Shambles on object that an opponent is wearing, only in the entirety of the person and, maybe, stuff they are holding with their hands, so him using Shambles on the Gauntlet on itself while Thanos wears it is a bit doubtious to me.
And apart from that anything else he does will take too much time to actually incap or kill Thanos before he is able to snap his fingers. And I think it's worth noting that the Snap have Universal range, so no matter where Law is, he will be affected by it.
I personally don't see Law winning this, but I wont discuss this any further since I don't have a lot of time, I just wanted to say my opinion on the match. My vote goes to Thanos.