Piglins briefly stop attacking when given gold items. If the player offers a gold ingot, bartering then takes place as it normally would. They resume attacking once the barter is complete.
Why do Piglins attack when I mine gold?
Opening chests and mining gold also makes them aggro. Maybe reason is because, that they'll trust you if you are wearing some. Maybe they'll think you're a minion of hoglins or at some doings with wither skeletons. If you're wearing gold, you can trade with them using golden ingots.
Do Piglins attack you if you are wearing Netherite?
So the piglins don't attack you when you have gold armor, but I think this should apply to netherite as well, since netherite is an alloy of gold and ancient debris. Netherite contains gold so if you were it I think it shouldn't aggravate the piglins.