Input Get Key Help

How should I do so that if I press A it does something and when I press B it does something else.

But when I press both of them at the same time it wont do A’s and B’s things

what I mean is, how do I stop input overlay?

if(Input.GetKey(A) && !Input.GetKey(B)) { // only A is pressed }
if(Input.GetKey(B) && !Input.GetKey(A)) { // only B is pressed }