The notion of blockchain security refers to securing the network through which transactions get recorded and verified.
Blockchain uses cryptographic techniques and a certain set of rules used by computers in the network to reach an agreement regarding the information stored within it.
Moreover, some blockchain systems implement a consensus algorithm to facilitate participants' agreement about transactions validity.
Nevertheless, blockchain security does not imply that all applications implemented in the network are secured against potential threats. For instance, Ethereum allows implementing smart contracts, which is a program that runs on the blockchain.
In case smart contract has a software vulnerability, attackers can exploit it despite the normal functioning of the blockchain.
This is due to the fact that different types of problems require different approaches in their resolving. Thus, network security ensures that the blockchain performs as expected and its records are reliable, while smart contract security is related to application's compliance with its requirements.
A blockchain may perform flawlessly whereas a particular application built on it may have a security issue.
The protection of wallets is related to ensuring safety of access and control over accounts and means for access to accounts (keys). Wallets are designed for management of information, which is required for authorization of transactions. As a rule, cryptocurrencies themselves are recorded on the blockchain, but not stored in the wallet application.
In case of self-custody wallets, it is crucial to ensure safety of private keys and the recovery phrase. Anyone who acquires necessary secret information can control corresponding assets.
It may happen due to phishing websites, malware, and improper treatment of recovery information, despite security of the blockchain itself.
Security of wallets also includes verification of transaction details. In case of networks like Ethereum, users may grant smart contracts permission to manage certain tokens, and therefore it is vital to understand permissions granted by transactions and approvals.
To sum up, security of the blockchain ensures safety of the network itself, whereas security of wallets ensures safety of your assets.
Security of both is essential because safety of the network will not protect you from all errors, stolen keys, and vulnerable applications.