How to fly for the United Nations?
The UN charters aircraft full-time from ICAO-compliant commercial operators (the aircraft are also painted in the UN livery). So you need to be working at one of those airlines/operators the UN chooses, and then it will depend on that employer's internal policy.

To fulfill its mission, UNHAS uses a fleet of more than 90 aircraft, including helicopters, chartered from commercial air operators (...) (UNHAS)

For example, ET-ALJ (shown below) has been with Ethiopian Airlines since 2003, and it is now chartered to the UN since Aug 2020. Another example is VP-BOW, a currently Nordwind Airlines 737-800 that was chartered to the UN 2017–2018, and is now back in regular Nordwind service.


— https://www.jetphotos.com/photo/9937427


See also: Wikipedia: United Nations Humanitarian Air Service