There's a pretty good overview here:
https://supermagnetman.com/blogs/news/understanding-magnet-g...
Neodymium-iron-boron magnets can have a higher energy product than samarium-cobalt, but require additions of expensive/rare heavy rare earth elements to work well at elevated temperatures. (Or require special microstructure modifications like Toyota has developed.) SmCo magnets have had good high temperature performance from the beginning, but a lower energy product.
Other issues that discourage widespread substitution of SmCo magnets for NIB:
- Samarium is significantly rarer than neodymium in economically exploitable rare earth resources (see table 1 here: https://pubs.usgs.gov/of/2013/1072/OFR2013-1072.pdf)
- The iron-boron balance of a neodymium-iron-boron magnet is cheap, whereas the cobalt in a SmCo magnet is relatively expensive.