If you are living outside of the US when your diversity visa is issued to you, the visa is usually valid for six months and you must travel to the United States before it expires.
For the current DV Lottery program (calendar year 2020), the latest date on which a diversity visa can be issued to you is on September 30, 2021. So the hypothetical last date on which you would be allowed to travel to the United States is on March 30, 2022. Remember, however, that the dates are dependent on the date your diversity visa is issued.
You must travel to the US before your permanent resident card (green card) is sent to you.