Yes farming dungeons is the best way to get artifacts. Getting the perfect artifacts are near impossible so you have to work with what you get.
I recommend farming the dragon 90% of the time, since it gives 3 good 2-set artifacts.
The most important to manage is the bottom row. Gloves, chest boots.
Some tips:
Gloves: crit damage, hp%, def% is best late game. Early game crit rate can be good aswell.
Chest: def%, hp% is best late game for some champions att% can be useful aswell
Boots: speed is best 99% of the time. Late game some speed tuned setups migth use def%, hp% and rarely att%.
In generel higher stars is better than lower even if the lower piece is a higher rarity. But it kind of depends on how much your champion depends on the primary stat.
In lower items you cant expect near perfect gear. I keep 6-star defense% chest even if they have only one good substat and I have played a long time.
My recommendation is to gradually be more picky. Once you start to have a full artifact storage clear out the worst pieces and raise you standard for what to keep. Soon you will only keep items in the top row if they 2 or three of the best stats or if stats synergise with the set.
When you clear out start by sorting for lower items with flatstat primary (except speed and resistance). Those items is 99% trash.
In jewelry you should use a different approach.
Rings: Look for how many % substats it has. A rare ring can be really good if it has two % substats. Does the substats match mainstat? Also remember an attack champion for clanboss benefits from primary stat defense and substat att% so even though you at first might think it does not synergies it suit attack champions perfectly. The other way around is close to trash. Noone needs a primary attack ring with defense%
Amulet: Basicly look for number of stars. since all substats are flatstats they dosent matter as much as the primary stat. Here you normally want defense/hp or crit damage. Accuracy is best substat.
Banner: here you will want accuracy/defense/hp and rarely attack and resistance. Speed is by far the best substat. Again number of stars is king especially on accuracy banners. Although a four-star legendary banner that rolle 3-4 times in speed is still alot of speed.