Current drawn by a servo motor

I am using a Arduino ,Servo motor(360degreee), a current sensor(ACS712,ACS758 LCB 050B),to measure the current drawn by the servo , i am trying it from many days unable to match current value by current sensor and DC power supply.
code i used
#include <Servo.h> // Includes the Servo library for controlling the servo motor

Servo myServo; // Creates an instance of the Servo class named myServo
const int servoPin = 7; // Digital pin connected to the servo

void setup() {
Serial.begin(9600); // Initializes serial communication at a baud rate of 9600
myServo.attach(servoPin); // Attaches the servo on pin 7 to the myServo object
}

void loop() {
static float sumCurrent = 0.0; // Variable to accumulate sum of current readings
static int count = 0; // Counter for number of readings

int adc = analogRead(A0); // Reads the analog value from pin A0
float voltage = adc * 5.0 / 1023.0; // Converts the ADC value to voltage
float current = (voltage - 2.5) / 0.066; // Converts the voltage to current (ACS712 sensor)

if (current < 0.16) {
current = 0; // Sets current to 0 if it is below a certain threshold
}

sumCurrent += current; // Accumulates current readings
count++; // Increments the count of readings

if (count == 40) { // After accumulating 40 readings
float averageCurrent = sumCurrent / count; // Computes the average current
Serial.print("Average current of 10 readings: ");
Serial.println(averageCurrent + 0.16); // Prints the average current
delay(20); // Waits for 20 milliseconds
sumCurrent = 0.0; // Resets the sumCurrent variable
count = 0; // Resets the count variable
}

myServo.write(180); // Sets servo speed to rotate continuously in one direction
// Uncomment the line below if you also want to print individual current readings
// Serial.println(current);
}

please tell me what to do to match the current values

Welcome to the forum

Please follow the advice given in the link below when posting code, in particular the section entitled 'Posting code and common code problems'

Use code tags (the < CODE/ > icon above the compose window) to make it easier to read and copy for examination

https://forum.arduino.cc/t/how-to-get-the-best-out-of-this-forum

In my experience the easiest way to tidy up the code and add the code tags is as follows

Start by tidying up your code by using Tools/Auto Format in the IDE to make it easier to read. Then use Edit/Copy for Forum and paste what was copied in a new reply. Code tags will have been added to the code to make it easy to read in the forum thus making it easier to provide help.

Post an annotated schematic (the language of electronics) showing exactly how you have wired this. Be sure to show all connections, power sources and note any leads over 10"/25cm.

What are your observations?

No matter how much i tired current values are varying
There is no match for the current values
To get accurate current value i am using 16 bit ADC also

Please follow the advice given to you by @UKHeliBob in post #2 and @gilshultz in post #3