How do I block ads on YouTube?

Well, Yes and No. Let me explain:

Yes, indeed, this method works. However, we did not implement it in the way you added it now, since (due to the right-to-left nature) this is also a wildcard whitelisting.

Say you wildcard blocklist domain.de and wildcard whitelist something.domain.de. While e.g. trash.domain.de will still be blocked, some.other.ad.something.domain.de will be permitted. This might be unexpected.

No, it shows it because it matches the wildcard blacklist filter. The wildcard whitelisting is not (officially) supported and hence the filter does not know about it.