To breathe underwater in Horizon Forbidden West you need the diving mask, which is an item of Special Gear that you can only craft during The Sea of Sands main quest, which is the quest in which you search for the POSEIDON subordinate function. The Seas of Sands unlocks at the end of The Eye of the Earth main quest.
During The Sea of Sands, you’ll travel to the ruins of Las Vegas and meet a group of delvers trying to retrieve salvage from Dunehollow, the flooded chambers beneath The Tower of Tears. This is also where Aloy believes POSEIDON to be, so your objectives are very much aligned with those of the delvers. They’ve been trying to dive using a device called the diving bubble, and have nearly drowned in the process. Once you’ve retrieved their compressed air capsule and hunted a Frost Bellowback for its synthetic membrane, then you can build the diving mask, which is far better than the diving bubble.
Once you’ve built the diving mask, underwater breathing is a simple matter of diving into deep water. You don’t need to equip it manually — Aloy wears it automatically when underwater — and there’s no limit to how long you can stay underwater when using it.