Publishers pre-set a time period which is called the attribution window within which they can claim for the users that are converted. The attribution window begins at the time an ad is served. Usually, the attribution window is set to 30 days. If a user views the ad and installs the app within 30 days then the publisher gets paid by the advertiser.
Several factors like the last click, first click ad view through, etc. The best practice is to set the mobile attribution window to 30 days as 80% of the users who viewed the ad will install and convert within that time. For example, if a person installs an app for medicine delivery during onboarding, he may not use it immediately but a 30-day window will give adequate time for their conversion.