Failing to complete installation

Hi , I’m facing this error when i install nextcloud on ubuntu 21. may you please assist.

ubuntu@sea-clutter-server:~$ sudo a2ensite rewrite headers dir mime env setenvif ssl
ERROR: Site rewrite does not exist!
ERROR: Site headers does not exist!
ERROR: Site dir does not exist!
ERROR: Site mime does not exist!
ERROR: Site env does not exist!
ERROR: Site setenvif does not exist!
ERROR: Site ssl does not exist!
ubuntu@sea-clutter-server:~$

I think correct is:
sudo a2enmod rewrite headers dir mime env setenvif ssl

It is not a good idea to install Nextcloud on a Ubuntu beta version (21.04, 21.10).
Use LTS realeases e.g. Ubuntu 20.04 LTS or Ubuntu 22.04 LTS.
Read Ubuntu release cycle | Ubuntu

Nice Nextcloud installation guide (Ubuntu 22.04 LTS with apache2)
https://www.howtoforge.com/tutorial/ubuntu-nginx-nextcloud/

And for Debian (Debian 11 with apache2)
https://www.howtoforge.com/how-to-install-nextcloud-on-debian-11