I'm a little bit confused with rest api endpoints. I developed a rest api using http POST to update some records in salesforce and it has this structure:
where I assume after the word apexrest I'm telling I have a class that will follow that path in my apex class and I'm passing some parameters like id, object and operation:
and of course I receive the parameters in a good way:

But after doing some research I found I can update a record using an endpoint like this: https://Mydomain.my.salesforce.com/services/**data/v54.0/sobjects/ObjectName/RecordId/**
So the question is what is the difference? or in case I use this path: services/data/v54.0/sobjects/ObjectName/RecordId/ how can I get the request body in apex like in the first example?
Resource: https://developer.salesforce.com/docs/atlas.en-us.api_rest.meta/api_rest/dome_update_fields.htm
