Start by tapping the grass or dirt while holding your hoe on your hand. Make sure the hoed area is at least 4 blocks away from water because 4 blocks is the maximum reach of the water. Then holding your carrots or potatoes tap it on the hoed area near the water source. Some potatoes could turn into poisonous potatoes so be careful. Hopefully this can be helpful to you.