The WP-Matomo plugin is an awesome plugin used to connect your existing Matomo On-Premise or Matomo Cloud account with your WordPress website.
So if you already have Matomo setup using one of these options, then installing WP-Matomo is the easiest and quickest solution to get your tracking code installed on your WordPress website.
Matomo for WordPress
Matomo for WordPress installs a complete version of Matomo onto the same server that your WordPress website is running on (Uses the same database as your WordPress website). This gives you the convenience of having a powerful web analytics tool installed and hosted completely within your WordPress website without needing anything extra. This version is the core version of Matomo and does not have any of the premium features. (These can be purchased separately)