How can i get the public key of my segwit address with my extended public key. when i import the xpub into electrum it automatically creates a legacy wallet for me. i'm not with my nano and won't be with it for a while, please how do i go about it, thanks.
You have to convert the xpub into p2wpkh or p2wpkh-p2sh format. You can use this script to do it.