Just for anyone that runs into this issue in the future, the problem is that you need to install ruby-dev:
sudo apt-get install ruby-dev
Afterward bundle install will finish as expected.
EDIT: Also if you’re on Windows 11 using WSL and you’ve selected Ubuntu 22.04 you’re going to have some issues. Would suggest installing 18.whatever. 22.04 forces OpenSSL 3 which Discourse doesn’t seem to play well with and it’s a chore getting libssl1.1 installed and working.