Have you added the following import clause in your main web part file:
import { MSGraphClientV3 } from '@microsoft/sp-http';
You could refer to following document
https://learn.microsoft.com/en-us/sharepoint/dev/spfx/use-msgraph