Alternatively it's possible that in Electrum you pasted the private key without putting p2wpkh: in front of it. If you don't do that then you might generate an address starting with a "1" or "3" instead of native segwit's bc1.
Correct. Full version:
For P2SH-P2WPKH addresses (Addresses starting with "3")Just add
p2wpkh-p2sh: directly in front of your private key.
For example
p2wpkh-p2sh:5BitcoinPrivateKey
This should generate the corresponding p2wpkh-p2sh bitcoin address.
For P2WPKH addresses (Bech32, starting with 'bc1')This time we'll add
p2wpkh: in front of the private key.
For example
p2wpkh:5PrivateKey
This should generate the corresponding Bech32 address