I think you must be having two components with 2 seperate directory and it should have html, ts, css files.
So in parent component's html you will reference child component -
parent.component.html -> <app-child> </app-child>
In the child component you should have - child.component.html, child.component.ts, child.component.css files.
If you create and add any similar styles like parent.component.css file in child.component.css then those will get added to each component like p[random_atttr_value], so now you will have seperate styles for p in child.
This is default behaviour of angular, comes in view encapsulation. Used by angular like shadow DOM techonlogy which is not supported by all broswers but angular does it like this.
In other words it adds some attributes to each component rendered on browser.
ViewEncapsulation has 3 options -
encapsulation: ViewEncapsulation.None,
ViewEncapsulation.Emulated, (-- this is default)
ViewEncapsulation.Native (-- only applies to browsers with shadow DOM technology)<br>
Hope this will help you to solve your problem.