Transactions on Cardano are normally validated in phase 1, which means before they even get onto the network they are completely verified. Smart contracts (Plutus validators), on the other hand, are validated in phase 2. Only the node that produces the block verifies the contract fully. In the event of a contract failure, a collateral is taken to cover the resources (cpu and memory) used by the node to verify the contract. When a script runs successfully, the collateral is not taken.
To set collateral on Nami Wallet, let follow the following steps:
Step 1: Click the Nami wallet extension icon and navigate to Collateral
Step 2: Enter your password and Confirm your transaction
Wait for the transaction submitted and you can check your Collateral amount!