This mainly depends on what you would do with the money instead.
If you would just keep it in your pocket (and it stays 5000), you can pay now, as both your debt and your 5000 lose value to inflation.
If you can invest it risk free in a way that you would have more than 5600 next year, it would be better to do so.
That being said, some thoughts:
High inflation is oftentimes accompanied by high interest rates. If you get more than 22% (this is what the credit card company charges you - but make sure it is in your currency) in your bank account or similar, you can just keep it there and make a profit.
If allowed in your country, you can maybe buy some stable foreign currencies, government or company bond, or a relatively stable commodity like gold. While their value might change, they should not be infected by your inflation and thus generate interest around the inflation rate. It bears the risk of laws changing in your country (e.g. you may not be able to access it anymore, or the government controls the exchange rate, then the "inflation gain" might depend on that official rate), and you may need to pay taxes on the gains.
Also, if you can estimate that you either need another credit within the year (and might need to pay more than 22% for it) or need to buy something else (that would be around 80% more expensive next year) where you don't have the credit card option, you could consider doing that instead.
Very generally speaking, for high inflation, spending your money (and even taking credit with low enough interest rates) for things that don't lose value as fast as the money, and that you thus can sell later for more money, is profitable. But since this will increase inflation (noone wants to keep the money, but spend it), the government might limit your options here. And if you legally can only buy things within your country, other people having the same idea as you might be driving prices up, thus reducing or neglecting the expected profit, or noone has the money or necessity to buy it back from you (e.g. a house in an area where all companies shut down might become worthless). And you always risk betting on the wrong horse, e.g. if you fill your oil tank today, assuming the prices are up 50% next winter, and the government then decides tomorrow to help out the people and give out free oil, you effectively lost the money. So "buying stuff now instead of later is good" is just a very general rule that might backfire, but I hope you got the idea.
You should also make sure that you estimated the inflation rate correctly, as a lot hinges on that. If the credit card company charges you 22% (which means they would lose money with 80% inflation), they may know more than you - as instead of lending you the money, they could, just as you, also buy US dollar (but again, they may not be allowed to, or forced to give that interest rate). Specifically, just because food and energy get 80% more expensive, doesn't mean US dollar, euro or gold also gain 80% against your currency, so the suggestion to buy it depends on your estimate being right and to also affect those. Maybe check the price development for the past (e.g. for dollar) against your inflation rate for the past. And also, the government may just be successful in lowering the inflation rate below 22% (which would be a risk for your specific scenario, but in general of course a good thing for your country and thus you).