This became available after the National Bank of Ukraine allowed this to happen. The service allows financial institutions to sell non-cash foreign currency to the public in the amount of up to 50 thousand UAH per month. This is reported on the website of the National Bank.
To buy currency through Privat24, you should go to the menu. There you find the category “Transfers to cards” and select a hryvnia card from which the money will be debited and a dollar or euro card to which the currency will be credited.