It is allowed to buy foreign currency to pay for import transactions of residents for the purchase of critical import goods according to the list approved by the Cabinet of Ministers of Ukraine in accordance with current legislation. But you need to pay attention to currency control — 90 days from the date of prepayment. More information here.