After many difficulties, the main issue with the "normal" installation process was that, out of the box, Fedora is missing some C++ headers that Ruby/Rails need to build the packages (like sqlite3, for example). It was solved once I ran:

sudo dnf install gcc-c++

And then I had to re-compile the missing packages, and install Webpack.

These are the series of commands I used, but maybe doing sudo dnf install gcc-c++ from the start could save a lo of trouble:

sudo dnf install gcc
sudo dnf install gcc-c++

Installation process

Start by installing the necessary packages:

# Ruby
ruby --version
sudo dnf install ruby
ruby --version

# SQLite3
sqlite3 --version

# NodeJS
node --version
sudo dnf install nodejs

# Yarn
yarn --version
sudo npm install yarn -g
yarn --version

# Rails
gem install rails
sudo dnf install ruby-devel
gem install rails
rails --version
mkdir Development
cd Development/
rails new blog

It failed, so I did:

sudo dnf install sqlite-devel
sudo dnf install gcc
sudo dnf install gcc-c++

Then, we try again:

rm -rf blog
rails new blog
cd blog
bin/rails server

And we need to fix the missing packages:

sudo gem pristine bindex --version 0.8.1
sudo gem pristine bootsnap --version 1.9.1
sudo gem pristine byebug --version 11.1.3
sudo gem pristine ffi --version 1.15.4~
sudo gem pristine ffi --version 1.15.4
sudo gem pristine msgpack --version 1.4.2
sudo gem pristine puma --version 5.5.0
sudo gem pristine racc --version 1.5.2
sudo gem pristine sassc --version 2.4.0
sudo gem pristine sqlite3 --version 1.4.2

Installing Webpacker:

rails webpacker:install

Now it works:

bin/rails server