Upgrading ubuntu 20 to 22

I have already registered a server to cleavr but my new website requires AVIF support in order to work. But gd module requires ubuntu 22: imageavif(): AVIF image support has been disabled · Issue #672 · shivammathur/setup-php · GitHub

Can i safely upgrade the server to ubuntu 22? does anyone tried this before?