Are you running with rails s? Try switching to ./bin/dev. If I’m not mistaking that option will install bootstrap in a way that requires a yarn process that watches and updates the files.
Can you share your .yarnrc.yml file? I had the same issue when using the Yarn Plug’n’Play feature (https://yarnpkg.com/features/pnp). I fixed the problem by going back to node-modules. Add nodeLinker: node-modules to your .yarnrc.yml file.
In my case, I had to install the appropriate requirements before running the rails new command.
It needs:
nodejs (apt install nodejs may install version 12 that is too old !)
npx
yarn
Here is a link to new rails app using Bootsrap and Postgresql: Constantin De La Roche / app-bootsrap · GitLab - look at the README.md that contains the instructions to generate your own new app.