In vs code I have imported the openzepplin ReentrancyGuard.sol but I am getting an error as import file not found

Hello, I am creating an erc20 token smart contract where I am using openzeppelin libraries such as: import "@openzeppelin/contracts/token/ERC20/extensions/ERC20Capped.sol";
import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/security/ReentrancyGuard.sol";

and I have setup this smart contract on vscode using hardhat and I also installed the package "@openzeppelin/contracts": "^5.0.2" using npm but in line: import "@openzeppelin/contracts/security/ReentrancyGuard.sol";
I am getting an error as: import file not found.
So please try to help me to resolve this problem.