According to the Wikipedia article on The People of the State of New York v. Donald J. Trump (emphasis mine):
The Manhattan District Attorney (DA), Alvin Bragg, accused Trump of falsifying these business records with the intent to commit other crimes: violation of federal campaign finance limits, unlawfully influencing the 2016 U.S. presidential election, and tax fraud.
What exactly did the prosecution accuse Trump of doing that unlawfully influenced the election?
What I've researched so far:
The Wikipedia article references the election a lot, but I couldn't find what exactly the prosecution said that Trump did to influence the election unlawfully.
This answer suggests that it is not illegal to pay someone to keep quiet ahead of an election, so the hush money payments themselves don't seem to have been illegal.
That answer also suggests that Cohen's actions were illegal because the hush money payments were not properly reported in campaign finance reports. So it's possible that improper campaign finance reporting is what would make the election influence unlawful. However, that answer specifically says that Cohen wasn't charged with "unduly" influencing the election, so it sounds like the illegal reporting is distinct from unlawful election influence.