Mobile attribution usually credits the last ad click (or impression) before the install within a defined lookback window. Methods include device-identifier matching, privacy-preserving frameworks such as SKAdNetwork and AdAttributionKit on iOS, and probabilistic modelling where permitted.
Attribution tells you where credit goes, not whether the marketing caused the result. Use incrementality tests for that, and read attribution as one input rather than ground truth.