I'm not entirely clear on what you mean by dynamic component, as in an Angular dynamic component or as in a scenario where you manipulate the DOM directly or something completely different. It sounds like you might even get away with just making an intermediate component with an *ngSwitch to toggle components on or off based on a flag.
For an Angular dynamic component, read up on dynamic component loaders here. Remember to add dynamic components to the entryComponents list in your NgModule otherwise Angular won't know how to find them.
In almost scenarios you should be using component loaders. However, if you do for some reason need to manipulate the DOM, you should inject Renderer2 and use that. You'll lose the convenience of Angular's data binding and event handling if you use this approach, though.