Can anybody explain why is the speed of Webb slowing down as it is moving away from earth?
JWST is like rolling a ball up a hill to have it coast to a stop at the top. Low Earth orbit is the "bottom" and the Sun-Earth L2 Lagrange point is the "peak" at the "top".
A note about speed and distance.
Speed is how much distance you're covering per unit of time. JWST's speed, as of this writing is, 0.7772 km/s. Every second it moves 0.7772 km along its path. When you're driving at 100 km/h you're moving 100 km in one hour down the road.
Distance how far JWST has traveled along its curved path to L2, just how in a car your distance traveled is along the road. JWST's distance from the Earth is its "altitude".
The frame of reference for JWST is Earth's orbit around the Sun. In this frame, JWST's speed was 0 just before launch. As it travels, its speed is measured as how fast it is proceeding along its path to L2 (not how fast it is moving away from the Earth), and it will be 0 again once it reaches L2 (more or less, read on about halo orbits).
(Since JWST is coasting it is technically going in a straight line in space; it's space which is curved.)
See NASA's Where Is Webb? for more, and click on each individual metric for details.
Here's a little more about the L2 Lagrange Point.
After JWST fires its upper stage to leave Earth orbit it will be coasting for the next 30 days into a higher orbit around the Sun. As it coasts, the gravity of the Earth and the Sun slow it down. As it moves away from the Earth, Earth's gravity gets weaker and weaker. After 1.5 million km Earth's gravity will be just a tiny fraction of what is at the surface.
This orbit is very special.
If you draw a line from the Sun through the Earth and 1.5 million km more you reach L2. At L2, JWST will be in orbit around the Sun. Normally objects in a higher orbit move slower and take longer to orbit the Sun, so normally JWST would take longer to orbit the Sun than the Earth. But at L2 the pull of Earth's gravity speeds JWST up just the right amount so its orbit is exactly 1 year. This keeps JWST always in the same position relative to the Earth and the Sun; JWST is orbiting the Sun, but its distance to the Earth will remain the same, and it will always have the Earth between it and the Sun.
Here is what the Earth, Sun, and Earth-Sun Lagrange Points look like relative to the Sun.
Since L2 is a gravitational "peak" it's not stable; at L2 any slight push in any direction starts you going downhill. Instead, JWST will orbit L2 in a halo orbit around L2. This is not entirely stable, but it is more stable. JWST is orbiting L2 and L2 orbits the Sun.
Watch James Webb Space Telescope Launch and Deployment and Scott Manley's video What Makes Lagrange Points Special Locations In Space for more about Lagrange Points.
As a space craft moves to a higher orbit, it trades velocity for altitude. For the red dot to get to the same path as the blue dot, it has to accelerate twice. Meaning the blue dot has even more energy than the red dot, even though it's going slower. Kind of unintuitive.
JWST still has as much energy as when it left LEO (minus what it spent on course corrections), but it has traded a lot of speed for altitude.
BONUS: In the next video, coins are put in a spiral machine. It simulates orbital mechanics. Notice how the coins at the top are going slower in bigger arcs than the coins at the bottom, which are going faster in smaller circles.
imagine a car going litle uphill ( or on strait road) at 100kmph and then you just move your foot from the accelarator pedal the car will start to slow down .When the JWT got detached from the launch rocket or vehicle earths and suns gravity slows its speed just like the car example
I did some calculations and found that the Sun's gravitational force on JWST seems to be around 39.6N. The centrifugal force of JWST in orbit around Sun seems to be 39.6N as well so they seem to cancel out. The Sun has no affect in slowing down JWST.
The Earth's gravitational pull force on JWST at 1,200,000 km away seems to be about 0.046N at that position and the speed of JWST is 0.3683 km/s at that point according to NASA.
At that speed, Earth's gravity is acting to slow down JWST. By knowing that F=Ma or a=F/M and V=at the time is about 600 days. We know that JWST will slow down in the next 15 days so there must be thrusters slowing down JWST.