You can install and configure any server, production or development, with any kind of domain name you like, existing or not, in real or fictional TLD, without having to pay for anything.
But no traffic based on this name will reach it unless clients do some specific configuration to be able to find it.
Like changing the content of
/etc/hosts on a Unix machine so that you force the resolution of
your-shiny-new-domain.example to be on your server IP address. This is helpful during development: you see things exactly as they will be later even if the domain name does not exist yet.
Of course, as soon as you really register the domain name (and there you will of course not be able to register one already existing nor one not using a TLD in the IANA root), it should be published in the global DNS and everyone will be able to reach it without any kind of specific configuration.