My understanding is that they are really pushing the policy of ordering from the referral link and not adding a code after the fact.
You can reach out to your SA though, sometimes they can add it after the fact, sometimes they can't, sometimes they say that they can but don't, etc.
I actually called Tesla when I ordered because at the time I was looking to trade in a car (which I later decided to pull) and I wanted to make sure to get both, the referral and the trade in and I was told to use my friend's referral link and that the trade will be assigned to my order based on my phone number.
I have an order on hold, and on the app it had showed a Loot Box with a link for a referral code. I saw recently that that box is gone. Can't pull my referral link from online account as well due to it being on hold. Not sure what's going on.
NVM, I didn't take delivery yet, lol. Incidentally, I went to the Tesla store today to ask some questions and place an order, and they ended up having one in the garage, so I bought it. Looking forward to getting it in my garage.