Why Utilities.getUuid() beats ROW() or RANDBETWEEN()
ROW() gives you a position, not an identity. Move the row, sort the sheet, or insert a blank above it and your "ID" silently changes. RANDBETWEEN() recalculates on every edit, so the value you logged this morning is gone by afternoon. Utilities.getUuid() produces a 128-bit RFC 4122 UUID — 36 characters, hyphen-separated, statistically impossible to collide — and setValue() writes it as a plain string that never recalculates.
The first time I hit this problem I used a CONCAT of timestamp plus RAND() and called it good. Three months later a collaborator sorted the sheet and half the IDs had silently re-rolled. UUID written via script is the only approach that actually holds.