Private and Proprietary to Apple
Unfortunately no-one here will be able to show you this code, the macOS Finder is not open source. Only a portion of underlying operating system is available as open source.
The Launch Services framework is responsible for launching graphical applications. See the Launch Services Programming Guide for an overview.
macOS's core, Darwin, is derived from FreeBSD. If you want to learn about the fundamentals of launching a new process, study today's FreeBSD code.
You will also want to fully understand
fork and how processes are created in UNIX like environments.
Fork (system call), Wikipedia:
In computing, particularly in the context of the Unix operating system and its workalikes, fork is an operation whereby a process creates a copy of itself. It is an interface which is required for compliance with the POSIX and Single UNIX Specification standards. It is usually implemented as a C Standard Library (libC) wrapper to the fork, clone, or other system calls of the kernel. Fork is the primary method of process creation on Unix-like operating systems.