check if player is colliding with a trigger

i need to check if The player is colliding with a trigger tagged “Dock” when they press “Q” and if its true then run “Water();” collision was never my forte so at the moment im pretty lost, especially since its been so long since ive done this. here’s what i have so far:

public class VehicleAccess : MonoBehaviour {
	
	
public bool AccessBoat = true;
public bool AccessCar = true;
public bool AccessAirship = true;
public GameObject Player;
	// Use this for initialization
	void Start () {
	
	}
	
	// Update is called once per frame
	void Update () {
		//If Q is pressed
		if(Input.GetKeyDown (KeyCode.Q))
		{
			//check for player's collision with game object tagged Dock
			//if true 

			Water();
			
		}
	
	}
	
	//If player is trying to enter the Ship
	void Water()
	{
		Debug.Log("Water");
		
	}
	
	
}

I know its not much but as i said i was never good at collision, which is all i need to understand and implement the collision detection to move on.

Add a boolean variable, set it to true when the collision starts, and false when the collision ends.

When the player presses Q, check that boolean.

public class VehicleAccess : MonoBehaviour {

private bool touchingDock = false;

public GameObject Player;
	// Update is called once per frame
	void Update () {
	   //If Q is pressed
	   if(Input.GetKeyDown (KeyCode.Q))
	   {
		 //check for player's collision with game object tagged Dock
		 if (touchingDock)
			Water();
	   }
	}
 
	void OnTriggerEnter(Collider other) {
		if (other.tag == "Dock") {
			touchingDock = true;
		}
	}
	
	void OnTriggerExit(Collider other) {
		if (other.tag == "Dock") {
			touchingDock = false;
		}
	}
}