I doubt it's trip.com that is cancelling your booking - it's almost certainly the underlying transport provider. Any booking agent like trip.com also dislikes their customers booked travel being cancelled because they now have a job to sort it out which eats into their operating margins.
When something gets cancelled then there's a rebooking process. This broadly falls into automated or manual. Which will vary between prompt and painless to slow and annoying - but it depends very much on the transport provider and their capabilities. Whatever happens you need to be given some options to rebook, and usually the option to cancel for a refund. And although things vary between transport providers and booking agents, when cancelling for a refund it is normal for it to take several days/weeks, as it's broadly a process that needs some manual checks by the finance team to ensure the money is being returned to where it came from - not only for their sanity but also you as the customer.
The key thing with trip.com is that you can interact online or usually call them and within a few minutes be speaking to a competent human. Try to repeat that with a few others and you will soon find out who is better than most of the consumer booking agents.