Every way should normally have a main tag. None of building:levels, source, nor note, are main tags.
Note, however, that my reading is that building:part should not have building tag, although there should be a way or relation covering the whole footprint of the building, that does have a building tag.
What concerns me more on this one is the source. It is definitely a broken link, and, whilst my German isn’t good enough to work out the details, I strongly suspect it is an illegal import of a copyright map (possibly a shopping centre plan??).
The source link is valid, but doesn’t seem to provide enough information to allow anything other than the name to be derived and looks to be from a place where the necessary database rights releases wouldn’t be given.
Tags on wholly enclosing ways do not propagate to the enclosed way.
In practice, one has to use a certain amount of common sense in determining whether inner areas cut holes in outer ones, as, for example, amenity=school within landuse=residential, is understood to cut a hole in the residential area,
In this case, I would suggest that both inner and outer ways should have been landuse=construction, but should have had different construction tags indicating what is being constructed. I think there is a trend from landuse=construction; construction=building to landuse=construction ; construction:building=shops, however, I’m not fully up to date on lifecycle prefixes, and don’t want to research the details just to answer this question.
building shouldn’t be used with building:part because the building as a whole should be represented as its own way or relation. 2D renders will generally ignore building:part… If 2D renders only had building:part to work with, they would render lots of boundary lines that didn’t represent boundaries between buildings.
I don’t think you will find a definitive list of main tags. Whilst you could get a subset by looking at the style sheets of renderers, there will be specialist cases that are not known to the commonly used styles.
I suspect the main use of the term is in diagnosing incorrect tagging, i.e. there are references to “no main tag”, but not to “main tags”.
Think about the thing as a real world item not just as a piece of XML. For example, picking somewhere entirely at random, It’s obvious what https://www.openstreetmap.org/node/2169282264 is because it’s tagged “amenity=fast_food”. However if it had only had “cuisine=chinese” then it wouldn’t be. Sure, it’s food-related, but is it a restaurant or something else?