Depends on the artifact...and the story...and the setting's internal consistency...probably a couple of other variables.
Since I can't speak to your game's story or setting, I'll just address the first. It's a matter of degrees, really. How do you [or, more importantly, the DM] see it working in the game world?
To my thinking, the Bauble of Uber-Over-Deity is going to beat the Super Weapon of Hero-spirit-of-legend. There might be a momentary "tete-a-tete", a couple of rounds of "Oh no, can we do this/will this work?" But the Bauble's going to wipe the floor with the Super Weapon on round 3 or 4.
The Demonlord's Handy-Dandy-Thingamabob-of-Wow versus the Archmage's Animated-Whoozits-of-Wuh? Probably pretty evenly matched, if in fact, they effect the same things at all. But gather together 3 very rare [powerful] magic items that effect the same thing with 5 very powerful mages, to work in concert, you can bet both the Thingamabob and Whoozits are going down.
As to the presented example...it, again, would depend on the artifact. If the first artifact is saying while you have it, you are immune to X. Then, another artifact says you automatically/at will can X targets...then I'd say they cancel each other out. So nothing, really happens. They are still immune to X from any other source. The X from the second artifact doesn't take effect.
Unless, and gods know stranger things have been made artifacts in the history of D&D, you have 2 artifacts that are specifically made/designed to work, either in concert, or against one another...Those things that share an ancient backstory, were always wielded against each other by ancient enemies, or designed to work in tandem against common threats, inherently balance the cosmos around them (destroying either destroys the multiverse

, etc... In which case, the artifact description would stipulate, "attacks by the Whoozits overcome protections from the Bauble, while the spell attacks amplified by the Bauble cannot be dispelled, counterspelled, or otherwise negated by the Whoozits," simply "no effect from the Thingamabob can effect someone wielding the Super Weapon, and vice versa," etc...