Are the cloves raw or cooked? I make a huge quantity of garlic confit once a year or so, and it freezes very well - I just slowly simmer the cloves in olive oil until they’re soft and brown, then drain most of the oil and pack the cloves into baggies for freezer storage. I usually freeze the oil separately too - it can be stored at room temp, but not indefinitely, so I just leave it in the freezer and break off a chunk when I want garlicky oil. With raw cloves, I would assume the freezing and thawing process would make them soft when thawed, but since you’re probably not going to be eating them whole that likely doesn’t matter.