Dear respected Esgar Montelongo,
Good day! Thank you for posting to Microsoft Community. We are happy to help you.
I’m sorry you’re having a problem but based on your description we can work together to resolve it.
For the situation you encountered, we deeply understand the inconvenience caused and apologize for it.
As per your description, you can use the Microsoft 365 Deployment Tool (ODT) to download and install Microsoft 365 for business offline without internet and use configuration.xml. The tool is designed for enterprise environments and runs from the command line. The internet only required to download the installer file, but once that's done, you can then install Microsoft 365 offline on a PC. For instructions, see Use the Office offline installer
For more detail using ODT:
Overview of the Office Deployment Tool
Configuration options for the Office Deployment Tool
Since you mentioned, " when I try to install it fails and errors out." If possible, could you please upload screenshot for our reference, so we can understand your exact scenario and provide our suggestion in a productive manner, perhaps some related screenshots will be helpful.
Appreciate your patience and understanding and thank you for your time and cooperation.
Sincerely,
Waqas Muhammad