It sounds like you may need to update the Ruby version that Jekyll is using. Here are some steps you can try:
Check your Ruby version:
Open a terminal or command prompt and type ruby -v to check which version of Ruby you have installed.
Install a newer version of Ruby:
If you don't have a version of Ruby 2.6.6 or higher, you can download and install it from the official Ruby website: https://www.ruby-lang.org/en/downloads/
Update your system's Ruby version:
If you already have a newer version of Ruby installed, you can update your system's default Ruby version by running sudo update-alternatives --config ruby in the terminal or command prompt. Select the version of Ruby you want to use as the default.
Install Jekyll:
Once you have the correct version of Ruby installed, you can install Jekyll by running gem install jekyll in the terminal or command prompt.
Check Jekyll version:
Type jekyll -v to confirm that Jekyll is installed and running on the correct version of Ruby.
If these steps don't work, you may want to try using a Ruby version manager like RVM or rbenv to manage your Ruby versions.