The official KB is here: https://kb.vmware.com/s/article/82568
You can't hot-remove memory, but you could set a limit to get it ballooned away, not that this is recommended.
You can't remove vCPUs but you can offline them from the guest OS, as long as they are 100% idle they have a negligible* impact on the VM.
P.S.
There is a setting, vcpu.hotremove, it also used to be in the UI at some point in the past and some API docs still mention it. It was partially implemented for hosted, i.e. Workstation and Fusion but never finalized due to lacking guest support, i.e. right now it does nothing.
* if 100% means also no timer or other interrupts, which should be the case with modern OS / virtual hardware versions, the offlined vCPU basically has no impact on scheduling, potential co-stop etc.