Currently, you either have to invoke the build process manually on the commandline with a specified number of jobs (= approximately cores) like
pio run -j 3
for 3 jobs in parallel, or a regular build will use all available cores. There is no environment variable to control the default number of jobs, it defaults to the detected number of CPU cores.
See
https://docs.platformio.org/en/latest/envvars.html
and Is it possible to say platformio to use all my CPUs during compiling? - #3 by maxgerhardt.
You could file a feature request for adding a e.g. PLATFORMIO_NUM_JOBS
variable, that is used as a default instead.