You can use Docker to run Home Assistant and Plex in containers, or user a hypervisor such as Proxmox and run Home Assistant and Plex in separate virtual machines (VM).
Managing Home Assistant as a container can be a bit more complicated than running Home Assistant OS on bare metal or in a VM. You don’t get access to backup functionality or the add on store for example, more things have to be manually configured
If your Pi 4 is running HA well enough, I would consider continuing to use the Pi. Reliability is key to a happy smart home, and if HA is running on its own hardware you won’t get any interruptions as you tinker with the mini PC. Plus it’s easy to swap in another Pi should you have a hardware failure.
Although VMs and containers can also be easily backed up and restored to new hardware should the need arise…honestly for home use it’s down to personally preference. Experiment and stick with what works best for you. Either way you will learn a lot in the process.