Every new object obtains a `UID` generated from the transaction context (`object::new(ctx)`). The `TxContext` provides transaction metadata: sender address, epoch timestamp, and fresh ID entropy.
move
public fun create(ctx: &mut TxContext): Greeting {
Greeting {
id: object::new(ctx),
text: std::string::utf8(b"Hello Sui"),
}
}