Polyurethane foam is better, it depends.
It depends on what fields are you going to use!
In terms of the thermal insulation performance, rigid PU foam is certainly the best, which has heat conduction data.
It depends on where you use, if there is restrictions on the space, you'd better use centrifugal glass wool, and if the place is narrow, you can use foam materials, their performances are almost the same.
The performances maybe are similar, of course, glass wool board with different unit weight, will also be different. Techniques are almost the same. Centrifugal glass wool board has better performance than that of polyurethane foam insulation materials in fire resistance.