The medium of exchange function of money is exactly what it sounds like. This function of money is to facilitate trade. If I am selling corn and you are selling cow, I may not want to trade at a fair level of exchange if I am a vegetarian because there is nothing I can do with your cow. I would have to trade the cow to someone else after I trade corn to you in hopes that the guy who sells lettuce or bread is interested in cow.
Money as a medium of exchange is so innate to humans and critical to civilization that we actually invented it before we invented written language. Bitcoin expert Andreas Antonopolous went so far as to say, “one could argue that written language was actually created to serve money, as the earliest writing we have discovered was written tallies, likely to keep track of people’s debts.” The human use of mediums of exchange, whether they be shells, rocks, coins, or otherwise, is older than human civilization itself. It seems that the use of money was even more obvious and instinctive to us than the use of being civilized.
Today, people rarely use cash at all. We use credit and debit cards, Venmo, Paypal, Cash App, wire transfers, money orders, checks, and more. Again, the value does not exist in any of these mediums. The value is merely exchanged through them as mediums. Mediums of exchange are not necessarily stores of value, though cash is an example of both. Similarly, something does not have to be functional as a medium of exchange in order to serve as a store of value, but it helps if the store of value can at least somewhat easily be converted into a form of money that might serve as a superior medium of exchange.
For example, if people could not fairly easily sell any gold they owned for dollars, then gold as an asset would probably be worth less. In and of itself, gold is not a useful medium of exchange because no one wants to lug it around and it would be impractical to shave bits and pieces off a block of gold every time one wanted to pay for a beer. Separately, few would want to send large amounts of gold across the country when the risk of physically losing it or having it stolen could be high. Nonetheless, without being an effective medium of exchange, the global supply of gold holds a value of around $10 Trillion because it is an extraordinary store of value.