You can freeze either cooked or raw garlic to use later, however, you will lose some of its vital nutrients by freezing it.  Do not freeze garlic that you want to plant as garlic can withstand freezing temperatures only if it is planted and already growing in the ground.