There is no limit on how long you can be off work and still find a job.
If you have been off a year or more, it will be harder to get an interview, but the level of difficulty does not change a lot after that.
Be able to articulate your reason for not working, and what you learned during that time.