You need to install the Google Analytics Drupal module. Install version 8.x-3.0. Then go to https://analytics.google.com and create a new property for your website. It will give you a new ID. Copy this ID, go to the configuration of the Google Analytics module of your website and paste the ID there (the field at the top). Now Google Analytics will start tracking your website traffic.
Then go to Google Search console. You need to create a property for your website there. Then go back to Google Analytics website, click on Admin and then on the property settings. Scroll down to Search console and click Adjust Search Console. Click the Add button and a window will open to link your website from search console. Once you link it the data will appear on your Google Analytics under Acquisition->Search console->Queries. You can also see the information that you are looking for in Google Search console website under Performance->Search results
However, it might take a few days till Google start gathering data.
Regarding Piwik (now Matomo), I don’t know if you get this out of the box. Once your website is created Matomo Analytics is enabled by default but I think you need a special plugin to track the keywords. Maybe you should open a ticket and ask the Piwik/Matomo admins.