If you are trying to either tame or breed goats, you are going to need to what they eat. In short, goats eat wheat just like cows in the game. So if you want to lure a goat over to your base or breed them, you will need to find yourself some wheat in Minecraft.
That said, you can get wheat in two main ways, the first is to loot the substance from villages, and the other is to grow it yourself. To grow wheat you will need to make a simple but efficient farm with a water source in the middle
Your farm doesn't have to be pretty, just three lines with the middle being water, and the rest dirt will be enough. After that you will then need to gather seeds from grass blocks in the game and then plant them, and after a few days you will get wheat.
Now you can, of course just loot it from villages, as most of the time, there will be a sizeable amount of wheat fully grown. However, this is not the best method in the long term, so we highly reccomend farming wheat yourself. Once you got yourself some wheat, you can then use to either lure, tame or breed your goats back at your base.
For more on Minecraft, check out How to Breed Goats in Minecraft and How to Breed Goats in Minecraft