Half correct. It was written down by multiple people. It was never formalized in a treaty. And yet we in the west wonder why Russia is skeptical when one day Zelenskyy and the US say, "Oh, we know Ukraine won't join NATO" and a few days later Zelenskyy says it is still an option and the US says it won't take it off the table.
That is exactly what we did with Russia for the last 30 years. It appears when Putin said Ukraine is a red-line for Russia, he actually meant it.
No, that doesn't justiry the invasion, but the context certainly makes it clearer how we got to this point.