I’m getting this error …in localhost/wordpress

Line 1090 is

function add_query_arg( ...$args ) {

This is the variable-length argument syntax that was introduced in PHP 5.6. You’re probably running an older version of PHP than that.

Since version 5.2 WordPress requires at least PHP 5.6.20, but currently recommends 7.4+. See the requirements page or the readme in the download.