Here is a pretty useful data pack, which was created specially to simplify the collection and planting of crops in minecraft. Together with the Right Click Harvest you will be able to harvest and instantly plant it just with the right mouse button, holding a hoe.
How to install Right Click Harvest Data Pack
- Open the game
- Select the world in which you want to install the data pack, and click on “Configure”
- Click on “Open world folder”
- Open the “data packs” folder and extract the downloaded archive to it