Above the function, add:
event Deposited(address indexed who, uint256 amount);
Nothing happens yet. An event is a shape, not an action.
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.24;
contract Vault {
uint256 public total;
function deposit(uint256 amount) external {
total += amount;
}
}