If you want to test it as it will be used then you need to do a standard install with a valid domain name.
If you want to install on localhost without a domain then you can look at the development install topics. It’s much harder to install, and much slower. It can also be a bit different, as you are responsible for installing all of the various pieces. There is a development install using docker that can be easier for someone unfamiliar with installing rails and the other required bits.