It looks like those installation docs are pretty poorly written.
I assume you are using ui mode for lovelace (since you don’t already have a ui-lovelace.yaml file).
So, once you add the file above to the ‘config/www/’ folder then go to the “configuration->lovelace dashboards” section of HA from the left side menu.
Then select “resources” tab.
Then click “add resource” in the bottom left.
then add the file local where you put the js file above.
if you put it in “config/www” then you will write that as “/local/”
so you should end up with something like:
/local/button-card.js
But the advice to install and run HACS is highly recommended since it will do all of the installation stuff for you.