Routing and Segments I'm using the following code for now:

Route (in the control panel)
    recipes/{slug} loads _recipes/restaurant

In the template to define the restaurant and list its items
    {% set restaurant = craft.entries.section('restaurants').slug(craft.app.request.getSegment(2)).one() %}


How do I change it to {slug}-recipes to make it work?

Advanced routing (in routing file) is preferred for performance.

Thanks.
Route: {slug}-recipes

The in the template:

{% set parts = craft.app.request.getSegment(1)|split("-") %}
{% set newslug = parts[0] %}


Then you can use: .slug(newslug)