Just to correct a mistake: - ./vaultwarden:/data/ means that the folder /data/ of the container is in the subfolder vaultwarden inside the folder that contains the docker-compose.yml. it is not located in /. for that you need to remove the leading "."
If you remove ./ vaultwarden points to a volume named vaultwarden that need to be defined separately:
./vaultwarden = relativ path from the docker-compose folder
/vaultwarden = absolut path /
vaultwarden = a volume called vaultwarden