I want a code for simple example "Like place one shield material and strike a particle to get some results"

My Geant4 Version is v11.2.0, Operating system is Ubuntu 20.04, Compiler is gcc (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0 and CMake Version is 3.16.3.

Did you look at any of the examples provided with the Geant4 distribution?

https://geant4-userdoc.web.cern.ch/Doxygen/examples_doc/html/index.html

Thank you for your response. yes, but i do not know how to modify with my requirement, like i have already mentioned.

Perhaps you want to review one of the recent Geant4 Tutorials, to understand how the software works and how to modify it?