To learn the basic operation of a DSO build with a electronic hobbyist common components.
Whit this small code write in arduino you can run quickly a very simple oscilloscope, that can draw signal up to 50KHz, if you want a project with advanced features I recommend this project: STM32-O-Scope, that even it using an STM32 board, it is very simple to build.
Atencion: The ESP32 processor only support 3.3v maximum in the analog imputs, if you need measure signals with higher voltages please implement a voltage divisor before.
Examples
Thanks