Hi @coderbang1,
The code in the forum uses OpenZeppelin Contracts 2.x. You could port it to OpenZeppelin Contracts 4.x
Please note, fee on transfer/deflationary tokens can cause issues, see: Points to consider when creating a fungible token (ERC20, ERC777)