Cannot even get a button working. What am I missing?

Also when you use Wix Storage you need to be storing the variable correctly.
https://www.wix.com/corvid/reference/wix-storage.Storage.html#setItem
https://www.wix.com/corvid/reference/wix-storage.Storage.html#getItem

Examples
Store an item in local storage

import {local} from 'wix-storage'; // ...  local.setItem("key", "value");

Key can be whatever name you want the stored item to be called.
Value is where you add the element name, so in your case it would be $w(‘#projectname2’).value.

Examples
Retrieve an item from local storage

import {local} from 'wix-storage';

// ...

let value = local.getItem("key"); // "value"

The value returned here will be the value that is assigned to the name that you have added to the getItem line, so here it would be the value that is associated with ‘key’

Just note that if the ‘#projectname2’ element is a text box, then you might need to change .value to .text instead.