Stavros portokalidis from Cern helped out and said the following (I never tried out Option 2 as option 1 worked out for me):
There is no need to downgrade to Ubuntu 20.04. BioDynaMo can be installed on Ubuntu 22.04, but the issue arises because the default installation command installs the latest official release, which does not support Ubuntu 22.04.
You have two reliable options:
Option 1: Install the latest development version via curl
export BDM_INSTALL=master
Option 2: Install directly from GitHub
cd biodynamo
./prerequisites.sh all
mkdir build && cd build
cmake .. && make -j$(nproc)
source ./bin/thisbdm.sh