Solidity version mismatch

Compiling your contracts...

Compiling ./contracts/Sample.sol

project:/contracts/Sample.sol:3:1: ParserError: Source file requires different compiler version (current compiler is 0.5.16+commit.9c3226ce.Emscripten.clang - note that nightly builds are considered to be strictly less than the released version
pragma solidity ^0.8.0;
^---------------------^

Error: Truffle is currently using solc 0.5.16, but one or more of your contracts specify "pragma solidity ^0.8.0".
Please update your truffle config or pragma statement(s).
(See https://trufflesuite.com/docs/truffle/reference/configuration#compiler-configuration for information on
configuring Truffle to use a specific solc compiler version.)

Compilation failed. See above.
Truffle v5.4.26 (core: 5.4.26)
Node v16.13.1

I think just like the error message.
You can use a lower compiler version in your contract: pragma solidity 0.5.16;
Or update your truffle to the latest version and set a right config in your truffle config file.