If you search the forum for Miracast you will find two threads I have contributed to about it.
So. Miracast is generally deprecated nowadays.
To be a recipient all you need is a Wifi device on your PC even if you normally use Ethernet.
To be a transmitter you need a compatible video card AND a compatible Wifi device and that it where it gets dodgy. My desktop has a supposedly compatible video card, Nvidia but I have 4 Wifi Dongles and none of them can cast. I have a theory that the Wifi card has to be on a fast bus not on USB, even USB 3. That would suggest that in a desktop that a PCIE or M2 Wifi card would work.
Modern Android phones will cast without any fiddling. I have a Nexus 5, a few years old now that works. iPhones cannot cast at all...software is not built in.
I have a laptop with Intel video and an a built in Intel Wifi card ( 2.4Ghz only) . This machine can cast and receive.
As for the other end. My dumb tv has a Roku device and a Microsoft Miracast receiver both plugged into my AVR rather than the TV itself. Either one can receive from my laptop. The laptop is using Ethernet to connect to the internet.
Note that the inbuilt card on the laptop is 2.4 Ghz only so to use Roku I have to change that to 2.4. I normally run on 5Ghz.
FWIW I usually just run an HDMI cable from the laptop to the AVR.