They tried taking all of Russia. The Ukrainians simply want to inflict enough pain to make Russia withdraw from Ukraine.
Hitler and Napoleon were defeated by General Winter, and attacking while insufficiently supplied for the Russian winter. In fact, Napoleon’s successful arrival at Moscow became the proverbial Tar Baby when Moscow was set on fire, burning to the ground and leaving no place for the victorious army to shelter. Fatal given their lack of winter supplies. As you say Ukraine’s goal is NOT the conquest of Russia, but the freedom of Ukraine.