They more than moved it. The LastSession.plist is no longer used in Safari 18.*. Read the posts here that talk about the files you need to restore from Time Machine and their location. I would make backups of the existing mentioned files so they are not overwritten.
If you do not clear your Safari history frequently, then I wrote a sqlite3 solution that when run like this:
./sql_dtu.zsh > ~/Desktop/Safari_hist.csv
will give you a CSV that has the following fields: timestamp, Title, and URL string. Upon opening with Finder Quick Look in nice tabular format, one can right-click on the URL string, and from the Services menu, select Open URL and that will open a new tab in the default browser.
Code:
#!/bin/zsh
: <<'COMMENT'
Generate a CSV document with headers showing current Safari History
database content. You can view the columnar CSV in a scrollable QuickLook window,
or load it into a spreadsheet
Reference: http://2016.padjo.org/tutorials/sqlite-your-browser-history/
Usage in Terminal:
./sql_dtu.zsh > ~/Desktop/hist.csv
VikingOSX, 2020-07-16, Apple Support Communities, No warranties expressed or implied.
COMMENT
sqlite3 -header -csv $HOME/Library/Safari/History.db \
"SELECT DISTINCT
datetime(visit_time + 978307200, 'unixepoch', 'localtime') AS visit_time,
coalesce(nullif(title,''), 'Unavailable') as title, url
FROM
history_visits
INNER JOIN
history_items ON
history_items.id = history_visits.history_item;"
exit 0
Tested with Safari 18.1 on macOS Sequoia v15.1 and Sonoma v14.7.