How to place a object in a surface orientation

As an example I need this object to be in the orientation of the roof automatically…how to do that?

Assign it ‘Glue to’ properties with a relevant axis.

where do I find its properties?

The component needs to have its Z-axis [blue] matching the face’s normal, and the component needs to have its ‘gluing-properties’ set to suit [any-surface] - either set when it’s first created, or later on when you edit it in the Component Browser.
The gluing only applies to any instances inserted into the model after the edit/creation, no any preexisting ones…