Upvote:3
You may qualify for visa on Arrival. Check with Saudia airlines to details. https://www.saudia.com/Pages/before-flying/travel-information/hajj-and-umrah/tourist-visa?sc_lang=en&sc_country=SG#EligibleCountries
For the flight Numberg - Istanbul - Riyadh, Turkish airlines will determine whether you have permission to enter Saudi Arabia. You are not leaving the airport is not a valid reason. They will deny your boarding.
Some Airports may allow Airside transfer. You can go to a transfer counter in Riyadh airport and can ask to connect the baggage (may be for a fee). You may have to check this with your airline. Then you may not need to go through passport control. Still first rule applies.
Also, for any reason, you can't able to take the second flight, your whole itenary form the Saudia will be cancelled, including return tickets. You may have to buy expensive last minute tickets to Kochi (which can be really expensive, as Kerala is one of the main destinations from Saudi).
If I were you, it is too risky and I won't take the flight.