does subdomain affect main domain

i want to know if
making subdomain with duplicate content of main domain, shitty content or any bad content affect seo and authority of the main domain
thanks