While not biologically accurate any starch source like potatoes, wheat, corn, barley or sweet potatoes counts in Black Desert Online as "grain" and is interchangeable in cooking recipes accordingly. 5 basic quality items can be exchanged with 2 high quality item or 1 top quality item.
They can be obtained by harvesting public farms manually (bare hand or for higher chance of harvesting use a Gathering Hoe) with the success rate and yield depending on the Farming skill. Another source are quests. Furthermore and can invest into a farming/resource node that offers the desired item and send a worker. This requires at least one empty slot in the corresponding warehouse.
Last but not least one can harvest them as crops when using a fence and planting the crop.