https://docs.soliditylang.org/en/v0.8.13/internals/layout_in_storage.html?highlight=string#bytes-and-string
The value types bytes1, bytes2, bytes3, …, bytes32 hold a sequence of bytes from one to up to 32.
bytes and string are encoded identically. In general, the encoding is similar to bytes1[], in the sense that there is a slot for the array itself and a data area that is computed using a keccak256 hash of that slot’s position. However, for short values (shorter than 32 bytes) the array elements are stored together with the length in the same slot