Considering that she was a late presidential candidate to the race and was still largely unknown to the general public, this widely viewed debate was her chance to become memorable to the public sphere. Nearly 70 million people watched the debate. It was one of her few chances to make an impact.
Everyone already knew Trump, and he had nothing to introduce or prove for himself. He made sure that she was forgettable, and only Trump himself made the memorable impact. Most people who watched the debate now barely remember what Harris said, and any of her content has been overshadowed by what Trump said by far. Being a forgettable participant is terrible for her campaign effort. In this sense Trump expertly nullified her goal and won the debate.