If you are faced with a challenge that puts you out of work or makes going to work difficult (layoff, quitting your job, pregnancy/newborn, taking care of a sick family member, etc.), try to occupy your free time with something productive.
It doesn't have to be that time consuming either. With access to the internet, it can be very easy to apply your time to something career-focused.
Start a blog - Write consistently about news & updates in your desired field of work. Call leaders at companies you would like to work for & interview them. This can help you build a network for job searching & provide valuable content for your readers.
Take online classes - Find online courses to develop highly desired skills like social media management, digital marketing, & data analysis. Then, add them to your resume's education section, & come back to your professional career even stronger.
Pick up a side hustle - If you work in accounting or finance, try helping people with their taxes. If you work in hospitality, try renting out your extra space with Airbnb or selling meal prep kits. Don't let your skills go to waste.
This shows employers that you used your time wisely & kept up with industry trends during your transition. Plus, you may create something amazing!