The 11.2 GB package is a compressed file. You need enough disk space to store both the compressed and expanded files.
A good rule of thumb is you need 5 times the space of the package you're downloading, which would be 56 GB in your case. See the article at the following link for more information:
meandmark.com/blog/2020/04/disk-space-required-to-install-xcode/
Topic:
Developer Tools & Services
SubTopic:
Xcode
Tags: