No, you can't do that directly, unless you perform a new installation. First you have to update to Windows 10, which is free of charge. Once you have done that, you can update to Windows 11 for free.
It is only important that you have backed up your most important personal data beforehand and that your PC or notebook also supports the requirements for Windows 11.