What is the best way to generate bitcoin wallet? I am trying to create a cold storage, and I'm becoming so paranoid about everything on software and hardware (also afraid of myself forgetting/losing the wallet) related to the setup.
I have read some information online about cold storage setup, and I have come up with these questions:

What is the safest way to generate bitcoin wallet? From the existing software such as bitcoin-core? electrum? (I thought of writing my own codes to generate bitcoin wallet, but there are so many types of bitcoin wallet BIP32, BIP39, etc which makes me think that it's not a good idea to do so)
How are we sure that bitcoin-core and electrum is generating a safe wallet? (not pre-seeded)
Which standard is the safest way to generate bitcoin wallet? BIP32, BIP39?
Does bitcoin-core uses BIP32 to generate the wallet? if not, which one does it use?
Does electrum uses BIP39 to generate the wallet? if not, which one does it use? (I read that electrum is using an extended BIP39.
I also read that bitcoin-core is not using BIP39 because it is not sure, but why BIP39 is still used in many wallets?
Is it possible that a hardware (CPU, motherboard, SSD, old computer that has been used by me before) is infected with a malware (from previous use or even from the manufacturer)? This malware might be able to mess with the entropy and create something like a pre-seeded wallet?

Thank You
What is the safest way to generate bitcoin wallet? From the existing software such as bitcoin-core? electrum?


Ensure you are using open source hardware and nothing is backdoored. I am not an expert but Luke Dashjr might help you with this considering some interesting tweets in past.

Ensure there are no malwares on system you use for bitcoin wallet. You can also use virtual machines or Qubes OS to keep things separate. Example: One virtual machine for bitcoin cold storage, One for hot wallet, One for social networking, One for office related work etc.

Don't use VM images from random sources, it can be backdoored: https://www.reddit.com/r/Bitcoin/comments/jrxgj8/bitcoin_core_node_hacked/

Use open source bitcoin wallet with more usage and active development, compile it yourself after reviewing the code for important things atleast: https://bitcoin.stackexchange.com/a/99480/

Create multiple backups for your wallet, test those backups and keep them safe.

Do not enter seed or anything on any website that helps other people get access to your bitcoin. Avoid entering seed on any online device.

Use hardware wallets like Coldcard if you find them safer compared to other things.



I also read that bitcoin-core is not using BIP39 because it is not sure, but why BIP39 is still used in many wallets?

https://bitcoin.stackexchange.com/a/88244/