It’s pretty simple- use Eevee, use a Diffuse BSDF plugged into a Shader to RGB plugged into a Color Ramp set to Constant with 2 or 3 stops.
That’s for the bare basics, and will leave a lot to be desired, but that’s a good start. For better results, check out this:
Or LightningBoyStudios on YouTube is a good resource