Keep in mind visits != D1 queries but still, D1 can easily handle it, yes π
Keep in mind visits != D1 queries but still, D1 can easily handle it, yes 

batch call are executed inside a single transaction: https://developers.cloudflare.com/d1/build-with-d1/d1-client-api/#batch-statementsBatched statements are SQL transactions. If a statement in the sequence fails, then an error is returned for that specific statement, and it aborts or rolls back the entire sequence.
googleUser.email and use that in your INSERT.batch(), but your second INSERT should do a nested SELECT to figure out the user ID that was added in the first insert.nanoid() into a local variable before you create your statements, and use that in both queries. Isn't that nanoid what you want in the second insert or is it an autoincrement key?.get().then((res) => res?.id!) part needs the query to actually run I imagine. I am not familiar with this framework you are using for constructing your queries..wrangler, but don't mess them up outside of your worker code to avoid unexpected behavior 
199187a5c9948d6a9eaef3ee19490fb5eec30c2012c4b4101aaeb362f07f1d3e.sqlitewrangler d1 execute βlocal <query> https://developers.cloudflare.com/workers/wrangler/commands/#execute

sql.exec() interface.sharedDB.batch([
sharedDB.insert(usersTable).values({
publicId: nanoid(),
name: googleUser.name,
email: googleUser.email
}).onConflictDoNothing()
.returning(),
sharedDB.insert(oauthAccountsTable).values({
providerId: "google",
providerUserId: googleUser.sub,
userId:// !!! no id
})
])await sharedDB.batch([
sharedDB.insert(usersTable).values({
publicId: nanoid(),
name: googleUser.name,
email: googleUser.email
}).onConflictDoNothing()
.returning(),
sharedDB.insert(oauthAccountsTable).values({
providerId: "google",
providerUserId: googleUser.sub,
userId: await sharedDB.select({ id: usersTable.id }).from(usersTable).where(eq(usersTable.email, googleUser.email)).get().then((res) => res?.id!),
})
])