How it works
A bech32 address is a prefix, a 1, the data, and a 6-character checksum. Changing the prefix keeps the data and recomputes the checksum. That is the whole conversion: same bytes, new prefix.
Hex is the same data in base 16. A public key becomes an address by hashing it: RIPEMD-160 of SHA-256 on Cosmos and gno.land, Keccak-256 on Ethereum-style chains, SHA-256 for ed25519 validator keys.