Which code part in bitcoin-core project generates new bitcoin addresses? i am trying to find out which c++ code in https://github.com/bitcoin/bitcoin

is responsible for generating bitcoin address and private key.
See CWallet::GenerateNewKey in src/wallet.cpp.  It calls either DeriveNewChildKey or MakeNewKey depending on whether HD wallets are in use.