GnuCash can import directly from your bank [1]. There are also some mobile apps [2], but they are not super well integrated with the desktop application - I think you have to manually export and import every time.
It can import directly from some banks maybe, but certainly not my bank. I haven't had any success importing to GnuCash from _any_ bank I do business with.
There is also the plaid api to gnucash [1], which should work with a lot more banks. Personally, I have not used any of these. My banks allow csv downloads, which works well enough for me. I wouldn't give my data to a 3rd party in any case.
Every bank I've ever used has had functionality to do csv exports (or xlsx, for which I have a one-liner to convert to csv), which can trivially be imported into gnucash.
At least in the UK/EU, it seems to be a common feature.
I used to have this problem, but then I found most banks offer free export to some file format - even those that charge for SW integration. You just have to dig around the site to find the feature.
[1] https://www.gnucash.org/docs/v5/C/gnucash-manual/tools-on-li...
[2] https://wiki.gnucash.org/wiki/GnuCash_and_Mobile_Devices