Apollo was canceled because it was so expensive.
Apollo was cancelled due to failure of political will as was Project Orion before it. Money was not the issue.
Nixon canceled Apollo to free up funds for LBJ’s great society programs. Nixon was almost perfectly wrong in every decision he ever made.
Apollo was massively expensive as a launch system and had no real future — it wasn’t designed for anything but one off shots to the moon. Also, the very nature of the moon missions were incredibly risky. The lack of political will was more on the nuclear end of things, which is absolutely essential for sustained manned space exploration beyond low earth orbit.
Nixon also sabotaged the shuttle program, effectively killing any real manned space exploration for the next fifty years (and counting).