Hello good people
Which circuit better for 7 segment led connect to the micro controller ?

If the resistor connect to each diode or connect to the voltage only

Hi and welcome.

I’m not sure i understand your question, so i will take a guess. I think you want to drive a single digit common-anode 7 segment display directly with the Arduino. Please say if this is incorrect.

You should have a resistor for each segment, between the segment/cathode pins and the Arduino pins.

If, instead, you put a single resistor between the common anode and 5V, the brightness of the display will not be constant. It will vary depending how many segments are lit. So for example if you display “1” it will be brighter than “8”.