When a third-party developer wants to send data to Salesforce and perform some business logic on the Salesforce end, preferably a DML into any object, then, there are two ways we can handle it.
First, the developer can use the standard out-of-the-box REST API that salesforce provides or create a REST API based on the business requirement.
In case you are interested in how to use the out-of-the-box REST API Salesforce provides, you can follow this blog post.
Second, if the business requirement is a bit customized then we rely on custom REST API using Apex.
Let me walk you through the later use case.
For a simple usecase like mentioned above we don't have to go for Apex REST API we can go ahead with out of the box endpoints that salesforce provides. We will be reaching out to this option only when there a bit more customization required.
In case you want to test it, then you need to make a callout from apps like the postman or insomnia and check the response.
The next question will be, what's going to be the endpoint?
It's going to look something like this https://instance.salesforce.com/services/apexrest/Account/001XXXXXXXXXXXXXXX
Replace the instance (mentioned in the above URL with your org-specific instance) and make sure a valid account record is passed in the endpoint.