Temporary subdomains

Hello,

We are a hosting company offering shared hosting packages with cPanel access. We would like to provide a temporary domain for every customer who purchases a hosting plan.

After a user buys a hosting account, they will register their own main domain name. Until that domain becomes active, we want a temporary URL to be available in the following format: cPanelusername.temporarydomain.com

This temporary subdomain should automatically be created on the server and display the contents of that user’s public_html directory (essentially acting as a mirror of their hosting account until their main domain is fully activated).

Does anyone know how to configure this so it works automatically for each new account?
If you have experience with this setup, please share the instructions or recommended approach.

Thank you in advance.