The United States lost to Sweden 5-2 in its opening match at the ice hockey world championship on Friday.
The Swedes built a 2-0 lead through the goals from Eriksson Ek in the first period and Lucas Raymond in the second.
Werenski reduced the advantage to one with a slap shot from the top of the left circle midway through the middle frame but Marcus Johansson wristed a shot past Lyon to restore a two-goal advantage.
Nelson added the second American goal from the slot 3:43 into the final period.
In Group A in Prague, the host Czech Republic prevailed in a shootout to down Finland 1-0.
Earlier, 2023 runner-up Germany topped Slovakia 6-4.
Dominik Kahun, Jonas Muller, Lukas Kalble, Marc Michaelis, Leonhard Pfoderl and Tobias Eder had a goal each for the Germans and Philipp Grubauer stopped 35 shots.
Marek Hrivik, Martin Fehervary, Libor Hudacek and Matus Sukel scored for the Slovaks, who outshot the Germans 39-22, including 18-7 in the final period.
In Group A, Switzerland produced a three-goal second period against Norway to jump to 4-1 en route to a 5-2 victory.
Nino Niederreiter led the Swiss with a power play goal and an assist.
After the preliminary round, the top four in each eight-team group advances to the quarterfinals.
Russia and its ally Belarus are excluded for the third straight year due to the Russian invasion of Ukraine.
Information from The Associated Press was used in this report.