We get the cancellation date from our billing software via an API - every time a user logs in, we query the billing software to check the user’s plan, billing status etc so this means we don’t need to do anything more in the application outside of the ordinary.
When a client cancels, leave their account in place (but set to inactive) for a while as they may come back unless they explicitly ask for deletion of data or they choose to delete their own account (which they can do via the app) - sometimes people cancel and then realise they actually do need your service or they cancel, try something else and realise you are actually better than the alternatives etc.
When they cancel, in the cancellation email let them know if they do come back they won’t have to start again for x months and that can be a great way of getting them to come back if their new solution doesn’t meet their needs - at some point you need to make the decision to remove the data and it does depend on the type and size of data but I would never delete it all there and then.