Endrick became Real Madrid's youngest Champions League goalscorer while Kylian Mbappe also netted for the holders in a hard-fought home win over Stuttgart.
At 18 years and 58 days, the Brazilian broke the record set by club legend Raul in 1995, who scored against Ferencvaros aged 18 years and 113 days.
The striker, who joined the club this summer from Palmeiras, had already become the youngest player to score on his La Liga debut for Madrid in the 21st Century after coming off the bench against Real Valladolid.
After replacing Jude Bellingham in the 80th minute at the Bernabeu Stadium, Endrick wrapped up the points with the last kick of the game.
France forward Mbappe, who was making his debut in Europe's elite competition for Los Blancos, opened the scoring 20 seconds into the second half.
Aurelien Tchouameni's sweeping pass found the run of Rodrygo on the right and the Brazilian unselfishly squared the ball for Mbappe to tap in.
Former Brighton forward Deniz Undav made it tense inside the Bernabeu when he expertly headed in a deserved equaliser in the 68th minute.
Carlo Ancelotti's side needed an 83rd-minute header from Antonio Rudiger to retake the lead.
England midfielder Bellingham played for 80 minutes after missing the previous four matches with a calf injury.
Sebastian Hoeness may have wondered how his Stuttgart side did not take the lead in the first half after missing two one-on-one opportunities.
Enzo Millot missed the first huge chance after 10 minutes when he dragged his effort wide of the far post before Thibaut Courtois expertly saved Angelo Stiller's goal-bound shot.
Undav was involved again as he watched his shot from distance loop off the outstretched leg of Dani Carvajal and on to the top of the crossbar.
Real's Vinicius Jr also came close to getting on the scoresheet when his thunderous shot from the edge of the box crashed off the crossbar in the 58th minute.
Carlo Ancelotti's side travel to Lille next, while Stuttgart host Sparta Prague.
- Published17 September