How to make the auto generated ID unique values not auto incremented

you would normally block your content behind authorization (example: Bearer token) so only allowed users could fetch data.
Or you could add custom route that would accept only uuid input and then return only data that is connected to that uuid