Gold hasn't been a good hedge against inflation over the past highly inflationary year. That's not surprising since this precious metal's price is inversely correlated with the 10-year TIPS yield and with the trade-weighted dollar (charts below):
(1) The TIPS yield fell to a record low of -1.19% on November 9, 2021. It then moved higher, especially this year, closing at 0.72% today. This suggests that investors expect that real interest rates will rise as higher nominal rates will soon depress inflation. That's weighing on gold, and so is the higher rate of return on TIPS.
(2) The dollar has been very strong this year. At first it was because Fed officials sounded much more hawkish than officials at the other major central banks. Then the war in Ukraine resulted in a global energy and food crisis that is likely to be less painful for the US than the rest of the world. A strong dollar is usually bearish for commodity prices, including the price of gold.