Latvia has a separate law on the status of the civilian population of Ukraine, so there is no need to apply for refugee status. From January 1, 2023, residents of Ukraine who apply for temporary protection status in the Republic of Latvia will be issued a temporary residence permit for a period of two years.
You can issue a long-stay visa here (https://www.pmlp.gov.lv/lv/%20information-long-stay-visas-ukrainian-citizens):
In person in Riga, at the Support Center for Citizens of Ukraine (one-stop shop), str. Kalku, 1, Riga. The center is open on weekdays from 9:00 a.m. to 6:00 p.m. More information at riga.lv or by phone +371 80000800
In all offices of the Office of Citizenship and Migration Affairs (OCMA). For additional information, please call: +371 67209400 (Monday - Thursday from 8:30 a.m. to 4:00 p.m., Friday from 9:00 a.m. to 3:00 p.m.)
By post or courier, sending the documents to: OCMA migration department in Riga, Čiekurkalna 1.līnija 1, k-3, LV-1026 or any territorial department outside Riga.