How did I fix «System has not been booted with systemd as init system (PID 1). Can't operate.» for `mongodb-org-server`?

2023-08-24--19-34-54

I have solved the problem by upgrading MongoDB from 4.2 to 6.