Memory (1GB) exhausted on just activating the WordPress plugin

Our wordpress is multisite and I have the memory limit set to 1024MB.

I install the matomo plugin, and when I either try to activate on the full network, or go to any site and activate it, I get a 500 error and in the log:

PHP message: PHP Fatal error:  Allowed memory size of 1073741824 bytes exhausted (tried to allocate 20480 bytes) in /www/****/public/wp-includes/class-wpdb.php on line 2315PHP message: PHP Fatal error:  Allowed memory size of 1073741824 bytes exhausted (tried to allocate 20480 bytes) in /www/*****/public/wp-includes/class-wp-fatal-error-handler.php on line 76" while reading response header from upstream, client: 64.85.241.216, server: *****.cc, request: "GET /wp-admin/plugins.php?activate=true&plugin_status=all&paged=1&s= HTTP/2.0", upstream: "fastcgi://unix:/var/run/php8.1-fpm-****.sock:", host: "*****.cc:16336", referrer: "https://*****.cc/wp-admin/plugins.php"

It’s failing trying to do a query and loading all the results into memory. Not sure which query it’s doing on activation that’s causing this and if there’s any way to fix it, or if I accept that Matomo won’t work on my site?