From the Super Mario Wiki
Traced Memories is a minigame in Wario: Master of Disguise. The player must trace the entire picture by using the before time runs out. While the player is tracing, some laser beams appear moving back and forth in various patterns to hinder the moment. Touching the beam causes the player to lose a Wario Cap. As difficulty increases, more lasers are added, and they move in different patterns. If the player loses all the caps available, the game ends. Once the player has finished, they can tap on the OK button of the touch screen to see the results. The results depend on how good the player traces the image and how many mistakes were made. The player cannot erase or undo once they trace on the screen.
"Trace the image before time runs out. If you touch a laser, you'll get zapped!"