Tanjiro and Giyuu both learned from master Urokodaki that's why they both know water breathing. But not every person can master the water breathing forms (same with the other forms). For example Zenitsu, he can only do 1 of the 6 thunder breathing forms, his master tried teaching him all of them but he could only do 1.