The reason for this is that some laptops (plus Windows and macOS themselves) have a feature that automatically disables the touchpad when you connect an external mouse. This could be why your touchpad has stopped working. For best results when testing this, shut down your system, unplug all connected non-essential devices and accessories, then boot back up.