If you are familiar with the old OptiX API (1 - 6) then there are multiple OptiX SDK examples which have been provided inside the OptiX 6 and 7 SDK doing the same thing.
For additional OptiX 7 API porting guides please have a look at all sticky posts inside this OptiX sub-forum.
There is a blog post about how to get started with OptiX 7, explaining the SDK’s optixTriangle example.
There is a step-by-step tutorial in the SIGGRAPH 2019 course examples.
Then there are ports of the later OptiX 5.1 based OptiX Introduction examples to OptiX 7.x using the CUDA Runtime API and CUDA Driver API.
Find links in here:
https://forums.developer.nvidia.com/t/optix-7-2-release/156619
https://forums.developer.nvidia.com/t/optix-advanced-samples-on-github/48410/3
Also many threads on this forum deal with porting questions, which explain differences and how to do things with the new API.
The online raytracing documentation can be found here: https://raytracing-docs.nvidia.com/