I would like to install Home Assistant via Putty.
Now I have put Raspbian Buster Lite on an SD, this is now in my pi 4. I have followed the manual of Home Assistant, but now I do not get a 404 page and once I close Putty, the page can no longer be found found it.
Because you didn’t set it up as a service as the instructions tell you. When you run the command hass it is running the software. When you close the session, that command stops running. Set up the autostart for it, per the documentation.
Given your struggles, you may want to consider the (deprecated) Hassbian install which will give you Raspbian + Home Assistant as a pre-packaged install, or maybe use the alternative Hass.io install option.