When you use WordPress Multisite with subdomains, you need to add each subdomain to cPanel or DirectAdmin and set it up to use the correct Document Root.
Go to cPanel → Domains → Create a New Domain.

Type in the name of the subdomain.

Set the Document Root.
This should be the same Document Root as your WordPress Multisite.
Screenshot placeholder: cPanel-create-subdomain.png
⚠️ Note: The Document Root is usually public_html, but if your WordPress Multisite is based on an addon domain, it may be in a different location.
If the subdomain already exists, click Manage next to it on the Domains screen.
Set a new Document Root.
Click Update.
Screenshot placeholder: cPanel-update-docroot.png
Go to DirectAdmin (User Level) → Subdomain Management → Add Subdomain.
Type in the name of the subdomain and click Create.
Screenshot placeholder: DirectAdmin-add-subdomain.png
By default, DirectAdmin sets the Document Root as:
/domains/yourdomain/public_html/subdomainTo use the same Document Root as your WordPress Multisite:
Click the pencil icon next to the Docroot.
Set public_html and private_html to Custom.
Enter the same Document Root as your WordPress Multisite.
Click Save and wait a few minutes for DirectAdmin to apply the changes.
Screenshot placeholder: DirectAdmin-update-docroot.png
After this, your subdomain should be fully functional and use the correct Document Root.