Yes, there's a more efficient way using arrays and parameterized queries within a loop.
Instead of inserting each record individually, you can construct an array of objects and use a single insert statement with a loop. This significantly reduces database round trips.