Configuration domain and subdomain

Hi i have my VPS server with my primary domain pointing to it
www.primarydomain.com

i need help to make know how to make subdomains on this server so i can have site1.primarydomain.com
than site2.primarydomain.com and so on

do i need to make this subdomains on my domain provider or i can do it inside of the VPS server?

i Have follow this link https://frappe.github.io/frappe/user/en/bench/guides/setup-multitenancy.html but i didnt work

https://github.com/frappe/bench/wiki/Multitenant-Setup

you should add a zone in the DNS so that subdomain will be routed to the server where u have Frappe/ERPNext

i.e.

you have ur primarydomain.com pointing to your VPS with IP 192.185.5.215 on which u installed Frappe, than u have to:

  • go to DNS manager
  • add CNAME zone as: site1 pointing to @ or site1 pointing to IP 192.185.5.215
  • add "host_name" = "site1.primarydomain.com" in site_config.json for your frappe site

i dont know if i am doing anything wrong but i am not getting there, actualy i am not very expert on this so if you have an step by step tutorial it would help