KDE2 was released in the year 2000 and the last version was KDE 2.2.2 released in 2001.
It was released a long time ago, but thanks to the KDE Restoration Project there are sources that build on modern computers.
It's decently difficult, but if you have enough patience you can do it.
This guide will be based on Arch Linux. If you're on another distribution like Debian, Fedora, or even Alpine, searching around should be enough to find identical packages.