Likely a question that will be brought up when you want to start optimizing your stats. You can only get a Physical/Elemental DMG Bonus from an artifact mainstat, and only on the goblet piece. So which goblet main stat to use? The short "tl;dr" answer is Physical/Elemental DMG is often better, but attack% can be better if you have good substats.
Attack is used as the source of all damage, so increasing attack will increase all damage dealt from a character. However, getting attack ≠ damage. When you get a +50% attack, it does not mean that you will deal 50% more damage. It works the same with Physical/Elemental DMG Bonus as well. The main difference is that a specific DMG bonus is more effective because of how damage is calculated.
If you want to know more about damage calculation, check the doc made by the community for a more in-depth post about it.
When you tap the "Details" button on the character screen, below your character's stats, you can see there are 2 numbers on the right. The white number is the base stats, and the green number on the right with the "+" are from your gears and buffs.
Base stats are inherently from your character, and also from the weapon that you equip. Levelling up your character and weapon will increase the base attack of your character.
The attack percentages and buffs are always a percentage of your base attack. Using the picture shown above as an example, the base stat is 483. Getting a +50% attack means that it gets a +241.5 additional attack = 724. Getting another +50% attack simply means another +241.5, instead of 724 * 1.5. There will be a point where you can get attack bonuses from many different sources making this less effective since it's always based on the base value.
Elemental/Physical DMG% and Bonuses
Picking a specific type of DMG bonus means that you lose out on the attack% artifact main piece, this could essentially mean that you deal less overall damage, but these specific physical/elemental damage have its benefits.
Physical damage dealt can be increased by causing Superconduct on an enemy, reducing their physical resistance by around 40%. If you use elemental abilities to damage them, then it will deal lower damage compared to using an attack% main stat, but your physical damage will be higher if you use a Physical DMG Bonus main stat. The same with an elemental damage type. You can use elemental reactions like Melt and/or Vaporize to deal higher damage.
Diluc and Keqing are good examples to show with this. Both are main DPS that can deal physical and/or elemental damage, and can imbue their normal attacks with an element. Using atk% goblet main stat increases damage dealt by both types, but going with elemental dmg main stat can end up dealing more if you take advantage of elemental reactions.
This can also be further boosted by using artifact sets like Crimson Witch of Flames. If your playstyle doesn't revolve around combos, and just want a simple button mashing playstyle, then going full attack with Gladiators Finale can be the better option.
If you're feeling unsure about which one is better for your setup, it's better to calculate the stats and compare which one is better. You can do this manually by looking at the damage calculation formula, or use a damage calculator sites like the one shown above. Credit goes to u/ImpactGCalc on reddit.