Work on theme files on a server & browser preview before installing it

In order to work on WordPress code, you must have a working server with PHP properly configured, and you must install WordPress on that server. You cannot simply open the files the way you can vanilla HTML files. That won’t work. The PHP will not execute, for one, and there will be no database for another. Without those, you get little to no output, and you certainly get nothing like the dynamically generated site.