A subdomain is a separate website on the same domain. If your domain is mysite.com, your subdomain might look like blog.mysite.com. Mysite.com is the root domain, which consists of your unique name and the top-level domain. Subdomain names always appear before the root domain and have a period after them. A subdirectory would look like mysite.com/blog.
Subdomains have several advantages over subdirectories, including you can link to your root domain from a subdomain and search engines see subdomains as separate sites, so there is a chance to get more traffic. Search engines will crawl both sites for their index. Google says they don't discriminate; subdomains are treated as any other website.
There are several uses for subdomains, such as adding a blog or e-commerce site to your main domain. This way you can differentiate different functions. SEO professionals will say you may waste good keywords and content in a blog on a subdomain when they could help your root domain rank higher. Some publishers use a subdomain for a help desk or e-commerce functions since these may use different software.
You can also use subdomains for different language versions of your website. It is much easier than trying to keep up with numerous country-specific TLDs. You only have to remember to renew one domain name instead of many different ones.
If you're an SEO professional or web designer, you may come across a client who has a new site, but wants to put the old one on a subdomain. If they just want to access the content, you can make sure search engines won't crawl it so it's not duplicate content. This way, they can keep it as long as they like. Otherwise, you may want to discourage them from doing this unless they are simply waiting to make sure they like the new website. For more information click here https://www.reddit.com/r/SEO/comments/gw7ghu/clientwantstokeepoldsiteon_subdomain/.