Use that gold block to make golden boots, and when you wear them Piglins will not attack you unless you attack them, break any gold-related blocks, open or break chests, trapped chests, ender chests, Shulker boxes, barrels, minecarts with chests and minecarts with hoppers.