Sub-domains are treated as separate domains by Google. The main domain’s authority will not transfer to the subdoain.

But all SEO tools are showing subdomain and main domain authority same
Filter with ahrefs, some applications take the total values of domains and subdomains, and add them together! You must do an individual scan with ahrefs or MozBar.
Let me explain the concept of sub-directory & sub-domain with an example: Picture yourself in your college. There’s a computer science engineering department with your college, there’s electrical engineering, and there are many more. These departments are subdomain. Even they’re under college, they’re still separate entities. Now, within the CS dept, there can be majors in computer graphics, software engineering, data structures & algorithms etc. These are sub-directories, within the department & not independent of the department.