Each address type (legacy, p2sh-segwit, segwit, taproot) has a different method of generation. In general, they start with a public key. Note that public keys are not an address. Public keys can be transformed into an address of each type. Creating an address from a public key is deterministic; if you try to make two addresses for the same type from the same public key, then you will get the same address.
Legacy, p2sh-segwit, and native segwit addresses are all based on a hash of the public key. Taproot is based on the public key itself.
When you generate a new address, you are actually generating a new private key, calculating its public key, and then computing an address from that public key. This applies to all of the address types.