Hi! After much troubleshooting and many dead ends, I finally got it working for me. I am currently using a MacBook Pro Monterey v12.7.4. You need this to open the database files, so make sure you download it first: https://sqlitebrowser.org/.
The reason it originally didn't work for me is that from Users, there was no visible Library folder to open and therefore the history.db 'didn't exist'. In order to solve this, I searched ".db" in finder. History.db didn't come up, but I used another random file that ended in ".db" to find it (I tested with Assets.db, pcs.db, and Records.db which all work). At the bottom if you single-click, it should show you the pathway used to open the doc, such as:
User -> Library -> Containers -> Safari -> Data -> CloudKit -> [long string of letters&numbers] -> Records -> Records.db.
From here, I clicked on either Users or Library within the pathway chain (I had to try so many things I've forgotten which, I'm sorry!) - but for me, Library was grey (indicating it was inaccessible, 'didn't exist' etc) so I had to make an alias of it by right-clicking. I am not a programmer and don't know what it did, however everything now appears accessible as normal. From there, you go:
Users -> Library (alias) -> Safari -> History.db
When I tried to open it from finder (which will reroute to the DB Browser for SQLite), it gave me an error message saying "Could not open database file. Reason: unable to open database file". This resolved when I saved History.db to my desktop (I've heard you can resave it anywhere else as well, but I haven't tested). After that, open it from the desktop and the data should appear.
To find timestamps, click Browse Data, then Table dropdown arrow and sort by history_visits. If you type in the filter space under the column headings, it will adjust the results to only what matches your input, or you can sort chronologically/reverse (visit_time) or alphabetically/reverse (title) by clicking the relevant heading. You'll need to convert the timestamp from Core Data format to make it readable, which you can do here: https://www.epochconverter.com/coredata.
Throughout the entire process, I also had to adjust permissions of various files to allow read and write privileges. I don't know which ones were truly relevant so I don't have the specific files listed here but if you still have trouble, this is what I would try first. This was how I got everything working, I hope it helps you too!