After you buy a Cow or Sheep, you will need to buy one of these from Yodel Ranch for 500G. It is used to herd your barn animals. You can use it to call them back to the barn or corral them if your barn becomes too crowded for you to get around.
Cows and sheep often do not react much to the bell, even when ringing it continuously. Some players report better results when using the dog whistle and the bell together. Your dog's barking may help encourage the animals to follow you to the barn door. Also, try standing a little closer to the animal. Once you lure the animal in front of the barn door, push the animal against the door to place them inside (or outside). The animal will disappear from your view when pushed inside (or outside). It can be a lot of effort to move animals in and out of the barn, so some players prefer to just keep their animals inside all the time.