You would need a second graphics card to pass through to your guest OS (It can be anything, but you'll have the most success with 2 different cards).
There are a few videos on how to do this and I would suggest you check out GrayWolfTech, his tutorial is based on debian but other than some minor changes it applies to pretty much any distro.
You can find a short, but relatively hard to folllow video on his channel, but he has uploaded a written guide on this forum aswell