Generally, fixed price contracts are less risky for the buyer, the buyer loses profit when unit prices rise between execution and delivery. Cost plus type contracts are often riskier for the buyer because prices can rise between execution and delivery. Now in reality, neither is inherently more risky because contracts are often written in a way that the risk is often born evenly.
Time and materials is somewhere in between, often for shorter duration work or staff augmentation.
Hope this helps.