How to add background image with background environment and only render the first?
If what you want to achieve is a render without the HDRI Background, you can go to Properties Panel > Render > Film > Transparent [x] []1

Another option could be going to Properties --> World --> Ray Visibility --> Uncheck the "Camera" Box.

Hopefully this is what you need, Cheers!