Local build of the site failing due to an error when running "bundle exec Jekyll serve"

I suggest you search the forums and Jekyll before posting.

Your error is cannot find webrick.

There have been a few posts around this exact issue and three identical issues on GitHub.

See for example:

This issue is specific to Ruby 3, and that is why you fixed it with downgrading to Ruby 2.X

If you want to keep using Ruby 3, then use the suggested answer in the linked post, which works for me.

bundle add webrick

Then commit your Gemfile so that webrick will be installed.

Also I found my lock file i had to be deleted and recreated when switching between 2 and 3. Which is the same as bundle update.