Hello,
You just need to install remote session host role in your VM and install your PC.
If you want to deploy a whole RDP environment, you can follow this link: https://learn.microsoft.com/en-us/windows-server/remote/remote-desktop-services/rds-deploy-infrastructure
If you mean a "template", I don't know if I'm misunderstanding, you may want to create a lot of PCs at the same time? It is more likely to be VDI, you can use this video as a reference
https://learn.microsoft.com/en-us/shows/oemtv/oem1712
Session Based (Session host) is more like a server, many users can login to it and work together.
VDI (similar function as Session host) is more like a PC, everyone has his own mini-PC.
If the Answer is helpful, please click "Accept Answer" and upvote it.