Inaccurate readings using ESP32 & SCT013 [50A/1v]

Welcome, @Shaharyar_Ahmed to the OEM forum.

I would not rely on a 3rd party source of information. Whilst such material is published with the best of intentions, I have no indication of knowledge or skill set of the contributor. All you need to know to make a simple monitor is here in the ‘Learn’ part of “Docs”, but I cannot recommend using the ESP32 if you are looking for accuracy. For the reasons, see this piece about the ESP32 Analogue Input: [TW#12287] ESP32 ADC accuracy · Issue #164 · espressif/esp-idf · GitHub and the comments that follow. The comment made on 21 Oct 2021 says the performance has improved, but I don’t use the ESP32 so I cannot confirm this.

Also, the circuit configuration you are using, although we used it for a long time (for a reason I don’t understand), is susceptible to noise and interference. I suggest you move the components around so that one side of the current transformer is grounded - like this:

Although this refers to an Arduino (which has a much better ADC) it should work after a fashion with your ESP32. You do not need the 33 Ω Burden resistor, with a 1 V output c.t. this component is inside the c.t. housing.
You might like to read the full page where that circuit appears: CT Sensors - Interfacing with an Arduino — OpenEnergyMonitor 0.0.1 documentation

This line in your software

emon1.current(ADC_INPUT, 30);

sets the calibration for a 30 A : 1 V c.t. Yours is a 50 A : 1 V, so replace the number 30 with 50.
For any c.t. used with emonLib, the calibration is the current that would give a voltage of 1 V at the ADC input, provided that the ADC reference voltage (3.3 V in this case) is correct.
You calculate it with a knowledge of the ADC voltage per count and the transformer ratio: 50 A gives 1 V, and 3.3 V gives 1023 counts. You’ll find the maths when you look at EmonLib.cpp.

One further point, the number of samples you ask for, 1480, is most probably not an optimal value. It should be the nearest whole number to the number of measurements the ADC makes in a whole number of cycles of the mains electricity - 20 ms per cycle if you’re in the 50 Hz world. You can only find this by measurement: Use millis( ) to time say 1100 measurements (emon1.calcIrms(1100), then time it for 100 measurements. The difference between the two times will be a reasonably accurate value for 1000 measurements. From this you can calculate a good number to fit into (I suggest) between 200 ms and 300 ms of mains cycles. 1480 was the best fit for the processor and ADC used in the Arduino, the Atmel ATMega 328P.