pH meter noise filtering

How do I filter the signal if I connect a pH meter (https://aliexpress.ru/item/32805675619.html?sku_id=10000015469358590&spm=a2g2w.productlist.search_results.6.1b8e4aa6kqmGWk) to A0 of the arduino nano?

What sort of noise are you trying to filter? Post an example.

For random instrumental noise, averaging some number of readings works.

I can't say for sure about the noise, but I did averaging, but the data jumps around a bit. Not too much, but they do

According to the multimeter, the voltage for example now in KCl (3M) solution is jumping, 4.7-4.9.

All experimental data do that. Such behavior is to be expected of the real world, and therefore, there are entire textbooks on data reduction and analysis.

Usually, people report an average value, and the standard deviation of the measurements, e.g. V = 4.8 +/- 0.1V.

Is it possible to try to put some kind of filter? I have a 6n136M optocoupler, can I use it?

An optocoupler is not a filter.

An RC low pass filter will perform some averaging, electronically.

Is the fluid container a non-conductor, like glass, and is the container connected to anything other than you sensor?

Such a dumb question)))))) How to do this filter for my case

is not connected to anything, but can be in the same flask as the conductometer during measurement

How many samples did you average over? Did you try increasing the number of samples?

Possible interference between the two sensors.

Ph = 0.95 * Ph + 0.05 * (V1 * SLOPE_calibrated + INTERCEPT_calibrated);

Post ALL the code, using code tags. The line that you posted above is a digital low pass filter.

Ok, so your code is calculating a kind of "running average", an exponentially weighted average.

Try changing those constants to 0.99 and 0.01

float V1, Ph, pH;
float SLOPE_calibrated = 1;
float INTERCEPT_calibrated = 0;
unsigned long StartTime;
unsigned long measurementDuration = 1000; 
void setup() {
  
  Serial.begin(9600);
  lcd.init();                     
  lcd.backlight();
  lcd.setCursor(5, 1);
  lcd.print("pH=");
}
void loop() {
  lcd.setCursor(0, 1);
  V1 = analogRead(0) * 5.00 / 1024;
  Ph = 0.95 * Ph + 0.05 * (V1 * SLOPE_calibrated + INTERCEPT_calibrated);
  
  unsigned long currentTime = millis();
  
  if (currentTime - startTime >= measurementDuration) {
 
    float averagedPh = Ph / (measurementDuration / 1000.0); 
    lcd.setCursor(1, 0);
    Serial.print(" pH= ");
    Serial.println(averagedPh, 2); 
    lcd.setCursor(8, 4);
    lcd.print(averagedPh);
    Ph = 0;
    startTime = currentTime;  
  }

I've tried it, but it feels like there's some interference, so I'm looking for a solution to protect against electromagnetic interference

This line is pointless! It does not calculate anything useful. If you change the value of measurementDuration, it will give an incorrect Ph value

Convergence will be much faster if you add these two lines to setup:

V1 = analogRead(0) * 5.00 / 1024;
Ph = V1 * SLOPE_calibrated + INTERCEPT_calibrated;

A pH electrode MUST be isolated in a glass beaker. There can be no other sensors or electrical connections in the same beaker, or you are guaranteed to have electrical interference.

As @PaulRB says, the "averagedPh" calculation is wrong. Remove it.

Finally, to have correct pH values, you must estimate and include the two correction constants, slope and intercept.

See this tutorial: Why Calibrate? | Calibrating Sensors | Adafruit Learning System

Anything can and will act as an antenna to bring noise into your sensor!