I have the building and then the roof. Is it correct to use layer=1? Or should I do something different for tagging it correctly?
When using building:part, you don’t add extra stuff to a building – you split the building into parts. Therefore, you also need one or more building:part area(s) for the main part of the building.
If you chose to not include the building:part=roof into the outline of the overall building, it’s best to also create a type=building relation with all parts as part members and the building outline as outline member, although I suspect many data consumers could handle this relatively unambiguous case without a relation.
(Documentation: Simple 3D Buildings)