The subprocess module documentation says:
The recommended approach to invoking subprocesses is to use the
run()function for all use cases it can handle. For more advanced use cases, the underlyingPopeninterface can be used directly.
Real Python has a tutorial on the subprocess module:
But I can’t tell you if it’s any good, because I haven’t read it yet…