CGI and newer technologies are not mutually exclusive. They can be complementary.
My Extreme Precision Binomial Probability Calculator (written in 2020 - 2021) is implemented using both PHP and CGI Perl, working together along with GMP, and a tiny bit of JavaScript.
Perl's support for arbitrary precision arithmetic, and its interface to the GNU Multiple Precision Arithmetic Library (GMP), make it a good language for implementing a tool like this. The same code runs both as a Perl command-line tool and as a CGI module. (In fact, on my server the download link for the binomcalc.pl command-line tool is actually just a Linux symlink to the binomcalc.cgi module.)
PHP (and HTML, CSS & JavaScript) are better for creating the Web interface.
The PHP code generates a CGI include directive, passing parameters to the Perl code. The Perl & GMP code then do the calculations, and generate the results, which appear on the web page.