Both standards are currently in effect, and a company can become certified to them right now, however, below is the information on transitioning from other standards and when these previous standards become obsolete as this is what is normally viewed as the cut off for implementation.
ISO 45001:2018 was released in March 2018, and as such will replace OHSAS 18001 in March 2021. At this point all companies who were registered to OHSAS 18001 will need to be transitioned over to ISO 45001, any certification will not be renewed, and the OHSAS standard will be made obsolete. This is confirmed in the BSI website, the organization that controlled the OHSAS 18001 standard, here: https://www.bsigroup.com/en-CA/BS-OHSAS-18001-Occupational-Health-and-Safety/
ISO 22000:2018 was published in June 2018, and if you had the ISO 22000:2005 standard in place you will have 3 years until June 2021 to make your transition. More about this standard can be found on the ISO website here: https://www.iso.org/standard/65464.html