No they dont't usually collect the data and forward it to third parties. With most stuff like this apps will embed a binary SDK which is initialized when the app starts. Because the SDK runs in the app's process it has all the same permission and data access that the app itself has. The SDK communicates with the relevant APIs directly. On the web similar models are often used with third party scripts loaded in the main page context.
For example here's Braze's developer integration guide https://www.braze.com/docs/developer_guide/platform_integrat...