The default attribution model used is that Matomo attributes goal conversions to the Last Non-Direct channel seen by visitors (their referrer).

The Last Non-Direct channel

In the context of web analytics, the Last Non-Direct channel refers to the last marketing channel, excluding the Direct channel, through which a user interacted with a website before completing a conversion. In other words, it shows the last source that contributed to the conversion, excluding instances where a user directly typed the website URL into their browser or clicked on a bookmark to access the site.

Change the default to « First Interaction »

You can customise the default channel for each website, as explained in this FAQ: credit conversions to the first referrer instead

Sometimes no attribution model will be possible

Multi-attribution depends on detecting the return of that visitor. To connect these successive visits over time you must be allowing Matomo to set the first party cookie or, if the person is signed in to your website, you can detect their return if you have configured User ID in Matomo).

The Matomo cookie is a first party cookie: its data either goes back to your Matomo On Premise server (often at the same host where you are privately hosting your website) or for users of Matomo Cloud, the cookie’s data only goes back to a private instance, deployed by Matomo, of your Matomo Cloud server.

Further reading:
How does Matomo detect unique and returning visitor, which touches on the several options Matomo simultaneously can juggle, optionally, for stringing together visits over time and connecting them all back to a single person
Configure Privacy Settings in Matomo, which includes how to set a cookie or not
Guide to Configure User IDs, which allows you to detect a returned visitor if they are logged in to your website with a password