Consumer and commercial bankruptcy filings have surged in the first six months of 2024 compared with the same period in 2023, a study said.