Or maybe does it need to be transplanted to a bigger pot?
It could be overwatering. That is common, and it does seem to be the case, here. It could also be rootbound. Both are probably likely. These two articles will offer more information on their care:
https://www.gardeningknowhow.com/houseplants/peace-lily/watering-peace-lilies.htm
https://www.gardeningknowhow.com/houseplants/peace-lily/peace-lily-plants.htm
It was blooming for years but for the last 2 years it hasn’t bloomed at all. I’ve repotted it and its thriving, getting much bigger, but no blooms.
The main reason any plant doesn't bloom is lack of light. So see if you can provide bright light to your plant but not direct sunlight. Here is more:
https://www.gardeningknowhow.com/houseplants/peace-lily/peace-lily-blooming.htm