How do I change the amount of time a player can spend underwater before taking drowning damage?

Solution 1:

You can use /data set to set the Air tag of the player to a lower value, this will give them less remaining time to breathe.