The second type is called third party cookies and these are placed by advertisements to track you across multiple sites (though there are other ways to do that which don't require a cookie). Presumably, the site owner could recieve some share of ads placed on their site, but in practice these third party cookies are placed by login tools (Google login) and other "drop-in" content which the site owner finds valuable but might not be advertising.
In this case, neither the money from the data collected about the user, which can be sold, nor the money from the ads which are delivered on later sites that were chosen because of the user's collected are shared with the owner of the site who passes out the cookie.