Both Apple and Google start to withdraw the funds for a purchase 24-hours before the trial or subscription renews. They outline this policy when you upgrade.
This also might be a pre-authorization hold. Both Apple and Google can put a pre-authorization hold on your account before charging you. They use authorization holds to confirm that your payment account is active and that you have funds available to make purchases. You can read more about Apple's policy here and Google's policy here.