Yield farming is a set of techniques deployed to maximize the yield (return) on a given crypto. It can also include liquidity farming as one of the techniques. On the other side, liquidity farming only focuses on maximizing yield by providing liquidity to a liquidity pool of a DEX.