Don't. On a quad core machine you need to leave at least 1, and preferably 2 (especially if on monterey or later) for the host. Otherwise you'll have worse performance due to resource contention. Note that you need to also leave at least 2GB (4GB for monterey or later) for the host to avoid performance issues.
You can change it in the settings panel for the virtual machine.