How to determine what is generating large amount of database queries?

You can use Query Monitor plugin

From Plugin Documention:

Here’s an overview of what’s shown:

Database Queries

  1. Shows all database queries performed on the current page
  2. Shows affected rows and time for all queries
  3. Show notifications for slow queries and queries with errors
  4. Filter queries by query type (SELECT, UPDATE, DELETE, etc)
  5. Filter queries by component (WordPress core, Plugin X, Plugin Y, theme)
  6. Filter queries by calling function
  7. View aggregate query information grouped by component, calling function, and type
  8. Super advanced: Supports multiple instances of wpdb on one page

Filtering queries by component or calling function makes it easy to
see which plugins, themes, or functions on your site are making the
most (or the slowest) database queries.