Is there a way to show me in the game which mod an item, NPC or building belongs to?
Depends on.
If you play with a ready-made modpack, there's usually a mod called NEI or JEI (Not Enough Items or JustEnoughItems). With that you can then filter for certain items by name, ID or mod.
Name → example item
ID → #XXXX
Mod → @Example Mod
Mod Name Tooltip shows you which item and which block belongs to which mod.