Solar used to be too expensive until we dumped resources and incentives into it, and scaled up manufacturing. Nuclear is expensive partly because there has been so little nuclear development or research in the last several decades.
For example nuclear energy has been working well in France since the 80s - 68% of their generation is nuclear making their carbon emissions far lower than other countries, and they recycle nuclear fuel. But declining resources being put into nuclear means that they didn't keep up with building new reactors so they are currently building the first new reactor in many years. That project is way over budget, and over its time estimate because the people with expertise building these things have retired, and the industries supporting reactor construction dried up. But now France is planning to build 6-14 new reactors so we will see if costs come down as experience and supporting industry ramp up.
To fully replace fossil fuels renewables require energy storage or supergrids which are in a promising-but-hypothetical state at the necessary scale. Meanwhile nuclear is a proven baseload producer - renewables + nuclear could provide all our energy needs. We should absolutely pursue energy storage and supergrids with all available resources. This is a time when we need to do all that things that can help us get to zero carbon. IMO that includes nuclear alongside the other options.