A fresh WordPress install, a curl request to /wp-json/, and a 404. It looks like the REST API is broken, but usually it’s just the permalink setting. There’s a way in that doesn’t touch the settings at all.
curl -s "https://example.com/?rest_route=/"
That returns the REST API index, the same thing /wp-json/ gives you with pretty permalinks. The official docs say it plainly: if you use non-pretty permalinks, you should pass the REST API route as a query string parameter. Their own example is the index route, http://oursite.com/?rest_route=/.
The same docs list this as the fix for a 404 on /wp-json/. They suggest you either enable pretty permalinks or use the rest_route parameter instead. For a quick check on a site you don’t want to reconfigure, the parameter is the faster path. For a site that people will use for real, I’d turn on pretty permalinks anyway.
Because the route sits in the query string, further parameters have to be added with & instead of a second ?. A request for the posts route with extra parameters would look like ?rest_route=/wp/v2/posts&per_page=1.
A caveat on that last point: the docs only show the index route as an example, so the posts example above is my reading of the rule and it was not run against a live site. If the index route answers, the same rule applies to the other routes.
Further reading: REST API handbook: key concepts