So when you compare average cost per year over the complete expected lifetime of the plants, nuclear is good, but when you compare the up-front cost to build it, yeah it looks bad.
Another thing is that nuclear in the US is far more costly than in e.g. France. The key is that France standardized a few reactor designs that they kept building again and again, which made both construction and maintenance cheaper over time. While in the US, each nuclear plant is a unicorn, which can perhaps result in better individual designs but ends up more expensive.