From Cursor's privacy policy:
If you enable "Privacy Mode" in Cursor's settings, none of your code will ever be stored by us or any third-party (except for OpenAI which persists the prompts we send to them for 30 days for trust and safety, unless you're on the business plan).
If you choose to keep Privacy Mode off, we may save prompts / collect telemetry data to improve the product.