Why Is SafeMath Less Necessary in Solidity 0.8.0 and Later?
SafeMath is less necessary in Solidity 0.8.0 and later because the compiler introduced built-in checks for integer overflow and underflow for all arithmetic operations by default. If an operation would cause an overflow or underflow, the transaction automatically reverts.
This change shifts the responsibility for preventing these common bugs from the developer (who had to use a library) to the compiler, significantly improving the security baseline and simplifying the code for new projects.