Says “Please type in the domain into the input field below that will be used for Nextcloud in order to create a new AIO instance.”
I dont wanna unnecessarily spend money
If you only need nextcloud on your local network, a quick and dirty way of assigning hostnames to machines is the hosts file. Obviously, this has to be done on every computer from which you wish to access nextcloud. Also, nonrooted mobile OSs don’t let you edit the hosts file.
Alternatively, you can set up a local DNS server. Pihole also has that capability (I personally had mixed results with Pihole, not sure if I did something wrong). Some routers may have that too.
If you need it public on the internet, yes, you need a domain name. Some providers offer free domains (but it will be a subdomain of the provider). Something to keep in mind is that your IP is probably dynamic. When you connect to the Internet, the ISP assigns you a random IP address from their pool of IPs. To keep the domain up to date, you will need to setup a dynamic DNS solution. This is a simple script/program that periodically checks your IP, and if it changes, updates that domain automatically.