Prevent one from doing action if one is activated (C# UNITY)

Good Day, I just want to ask if how can I do these.

I need to prevent one action from doing something if the another action is activated and vice versa . Here’s the code i have written so far.

if (hit == "spr_player")
    {
        betOnPlayer = true;
        if (betOnBanker)
        {
            Debug.LogError("You already bet on the banker cannot bet on the player"); ;
        }
        else
        {
            if (betOnPlayer)
            {
                bet[0] = chip;
                chips_bet[0].enabled = true;
                Chips(chip, 0);
                Debug.LogError("Betting on the player");
            }
            else
            {
                Debug.LogError("You can not bet on the Player");
            }
        }
    }

else if (hit == "spr_banker")
    {
        if (betOnPlayer)
        {
            Debug.LogError("You already bet on the banker cannot bet on the player");
            betOnBanker = true;
        }
        else
        {
            if (betOnBanker)
            {
                bet[4] = chip;
                chips_bet[4].enabled = true;
                Chips(chip, 4);
                Debug.LogError("Betting on the banker");
            }
            else
            {
                Debug.LogError("You can not bet on the Banker");
            }
        }
    }

But the problem here is that I couldn’t get to switch it on off . Could someone point out what I am doing wrong.

bool betOnPlayer;
bool betOnBanker;

void Bet (string hit) {			
	if (hit == "spr_player") {

		if (betOnBanker) {
			Debug.Log("You already bet on the banker!");
			return; // We return the function here to prevent it from running the rest of the code
		}
			
		betOnPlayer = true;
		BetOnPlayer();
	} else if (hit == "spr_banker") {
			
		if (betOnPlayer) {
			Debug.Log("You already bet on the player!");
			return; // We return the function here to prevent it from running the rest of the code
		}

		betOnBanker = true;
		BetOnBank();
	}
}

void BetOnBank() {
	// bet on bank behaviour
}

void BetOnPlayer() {
	// bet on player behaviour
}