Use at your own risk.
MAJOR DISCLAIMER: Potion farming was patched in the 1.17.30 update as a result of being too overpowered. The bug was incredibly overpowered as potions are intended to be somewhat of a rare item and also only have one use per bottle. This bug simply allowed the user to bypass the original intention for potions; hence the patch.
Potion farming is a way to get infinite potion using water, dripstones, and cauldrons filled with potions. The concept is very similar to lava farming, with a cauldron, a stalactite dripstone a block above the cauldron which is connected to a block with a water source over it. However, you need to place 1 potion of the one you want to farm into the cauldron (you can also do this with splash or lingering potions). Then you will need to wait in the area and once the cauldron becomes 2 or 3 high, harvest it with glass bottle(s) until it is only 1 high again. If you used a splash or lingering potion then when you pick it up with the glass bottle it will turn into a splash/lingering potion.