That play was the highlight of an otherwise up-and-down debut for the No. 3 pick in April's NFL draft. Lance, who replaced Jimmy Garoppolo after one series for the starting offense, played 29 snaps and went 5-of-14 for 128 yards and the touchdown for a passer rating of 93.8.
The Niners fell to the Chiefs 19-16 in Saturday's exhibition opener.
"It was super exciting," Lance said. "It's kind of what you dream of scoring your first touchdown. Even though it's preseason, it's pretty cool. It was for sure a special moment. I wish I could have capitalized on the opportunities that came after that."
Some of those missed opportunities couldn't be pinned on Lance, as three of his nine incompletions were drops, including one on his first pass attempt to starting wideout Brandon Aiyuk. Had those three passes been caught, Lance would have started the game with completions on his first seven attempts.
Lance also took four sacks behind an offensive line that was without starting center Alex Mack and left tackle Trent Williams. Lance fumbled once, which he recovered, and had two passes that were nearly intercepted.
"There was some good and some bad," Niners coach Kyle Shanahan said. "By no means was it perfect. He definitely missed a couple. There were a couple spots you'd like to see him go different places, a couple balls that sailed on him that I think he'd like to have back. But he also came out pretty good too, making the right plays and getting to the right spots ... but it was a good first day. I didn't want it to go perfect for him."
Lance took the blame for the sacks, though there were at least two in which he had little chance to get rid of the ball. Lance, who hasn't hesitated to take off running in training camp practices, had zero rushing attempts on Saturday.
"It's something I'm going to continue to learn from," Lance said. "Getting the ball out of my hands and into those guys' hands. The offensive line did a great job today. It's on me 100 percent as far as protection goes. Me using my legs to make plays and extend plays and extend drives, I wish I'd have done that a little bit better tonight, as well."
Despite those struggles, it was Lance's long touchdown throw to Sherfield that had Levi's Stadium buzzing and his teammates celebrating in unison. On his second series, Lance dropped back, sold a play-action fake to the right, rolled left and fired about 45 yards in the air from the left hash outside the right numbers to Sherfield, who was wide open and ran untouched into the end zone.
After the touchdown, Sherfield and Lance were greeted by almost every player and coach on the sidelines with a pat on the back or a high-five, including Garoppolo.
"It was awesome," Garoppolo said. "We kind of saw it coming. Knowing the play and everything, I was watching Trent the whole time, and he broke the guy off and Trey put a beautiful pass out there. It was really cool."
Garoppolo's lone series ended after an offensive pass interference penalty on tight end Charlie Woerner nullified a third-down completion to Aiyuk. Garoppolo finished 3-of-3 for 26 yards.
The 49ers held many of their key players out of Saturday's game. In addition to Williams and Mack, tight end George Kittle, fullback Kyle Juszczyk, linebacker Fred Warner, defensive linemen Arik Armstead, Dee Ford and Nick Bosa and cornerback Jason Verrett were among the 22 players the Niners opted to sit.
Josh Rosen replaced Lance on San Francisco's second offensive series of the third quarter.
Afterward, Lance said he planned to head home and waste no time digging into the game film, searching for things he didn't do well and looking to correct them.
"I didn't make every play tonight," Lance said. "The plays that were called were really, really good ones. So, I left some big ones out there that I noticed and we noticed on the sidelines. It was frustrating leaving those plays out there. I wanted to put more points on the board. A little frustrated, but super excited to go watch the tape and learn from it."