creating sub-domains – on the server – with DNS records that can point to the same server

good day, dear friends,

I have a root server – and i have a certain project in mind:
How easy is it to set up the following arrangement on such a server—if I have a relatively generic domain: let’s say, for example, cafe.com?

Can we then create subdomains like these:

Code:

central.cafe.com
clinic.cafe.com
school.cafe.com
xyz.cafe.com

How would that work technically—what are the server requirements?

Well i suppose that this is actually a classic setup, and with a root server and it’s very doable.

the Basic Idea -.. it looks somewhat like so: i want to have some Subdomains like

Code:

central.cafe.com
clinic.cafe.com
school.cafe.com
xyz.cafe.com

some assumptions: arent they are simply hmmm – “DNS records” that can point to the same server (or different servers).

with the two levels:

1. DNS (Domain Name System) → determines where `central.cafe.com` points.
2. Web server (e.g., Nginx, Apache) → decides what is delivered there.

hmmm – can i go like so? Are these assumptions pointing intot the right way?
look forward to hear from you

greetings

update:
ps. hmm – i guess that we access to the domain’s DNS management

There, i can create an A record or CNAME record for each subdomain:
for example like so: (if the server has, for example, 123.45.67.89):

Code:

central A 123.45.67.89
clinic A 123.45.67.89