Salesforce has a strict rule: You cannot perform a synchronous web service callout after performing a DML operation in the same transaction. In the provided code, the insert operations (DML) occur first, creating "uncommitted work" in the database. When the code then tries to execute makeRestCallout, the platform throws the error to prevent a long-running callout from holding database locks open. To resolve this, the callout must be moved to its own separate transaction. The most straightforward way to do this is to change the callout method to an @future(callout=true) method (Option B). When an @future method is called, the request is queued and executed in a new, independent transaction with its own governor limits. This decouples the database "work" from the external "callout." Option A is incorrect because simply moving the line doesn't change the transaction context. Option C (removing savepoints) doesn't help because the DML itself is the blocker. Option D (@InvocableMethod) is used for Flow/Process Builder and doesn't inherently solve the transaction boundary issue. Using an @future method (or a Queueable class) is the standard platform-aligned solution for this error.