Note that the code you based your application on is from an OptiX 5 API example, means it pre-dates support for built-in triangle primitives, which means your triangle geometry is not making use of the RT cores for ray-triangle intersection on the RTX boards.
Means you should remove the boundingbox_triangle_indexed.cu and intersection_triangle_indexed.cu by replacing these custom triangle primitives with the built-in triangle primitives first.
Much better would be to port all that code to the more modern OptiX API of versions 7 and higher.
For that I would also recommend using a newer Microsoft Visual Studio version. The free MSVS 2022 Community Edition will work (unless you’re planning a commercial application), and that is also supported by current CUDA versions.
To speed up that porting, there actually exist two ports of that old optixIntro_7 from the legacy OptiX 5 API to the new OptiX 7/8/9 API already inside the OptiX advanced samples here:
https://forums.developer.nvidia.com/t/optix-advanced-samples-on-github/48410/4