Symbols created using Symbol() are unique and immutable, so the only way you can reference it is by assigning it to a variable.
It's important to note that the constructor param is actually a description of the symbol, not a key. From MDN:
A description of the symbol which can be used for debugging but not to
access the symbol itself
(emphasis mine)
Symbol.for on the other hand stores Symbols in a global registry list using the specified key, so for your example to work you need to both create and access the symbol using Symbol.for:
const sym = Symbol.for("x"); // Create a symbol in the global registry
let obj = {
[sym]: "val"
}
console.log(obj[Symbol.for("x")]); // Access the symbol from the global registry