The original mission was about 5-10 years but....
The James Webb Space Telescope (JWST) was designed for a mission of at least five years, with a goal of 10 years. However, after the successful launch and commissioning of the telescope, the Webb team determined that the observatory should have enough propellant to support science operations in orbit for more than 20 years.
EDIT: "An
L2 orbit is
unstable, so JWST needs to use propellant to maintain its halo orbit around L2 (known as
station-keeping) to prevent the telescope from drifting away from its orbital position.
[189] It was designed to carry enough propellant for 10 years,
[190] but the precision of the Ariane 5 launch and the first midcourse correction were credited with saving enough onboard fuel that JWST may be able to maintain its orbit for around 20 years instead.
[191][192][193] Space.com called the launch "flawless".
[194]"
From
https://en.wikipedia.org/wiki/James_Webb_Space_Telescope
which referenced.
https://blogs.nasa.gov/webb/2021/12...l-likely-to-extend-its-lifetime-expectations/