After restart your server you need to enable extension. After that you can query pg_stat_statements. Check documentation https://www.postgresql.com/docs/current/pgstatstatements.html
CREATE EXTENSION pg_stat_statements;