Hi @harpal rana ,
As far as I know ,there is no such way to disable rest service in sharepoint online. Users can access rest service with only read permission. If we remove the read permission ,the list also unavailable for them. We can just block rest service in sharepoint server but not sharepoint online. We can set IIS URL Rewrite Rule to redirect users to other site by edit web.config in server, but we are unable to do this in sharepoint online.
If an Answer is helpful, please click "Accept Answer" and upvote it.
Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.