QuickBooks automatically downloads the last 90 days of your transactions after you connect your bank accounts. Since you want to go back as far as 2017 and beyond, you can manually upload them into your account. Let me guide you how.
To start, you need to make sure you don't import transactions you've already recorded. This will prevent duplicates. Here's how:
Go to the Accounting menu.
Select Chart of Accounts.
Find the bank or credit card account you want to upload more transactions into.
Choose Account history.
Scroll to the bottom of the list.
Write down the date of the oldest transaction.
Next is to download your transactions from your bank. Follow your bank’s instructions on how to download them to your computer and save it somewhere you can easily find it.
Then, review the file format and its size. Please make sure to select either the Comma-Separated Values (CSV) or the QuickBooks Online (QBO) format. The maximum file size is 350 KB.
Once done, you can now upload your file to your QuickBooks Online account. Here's how:
Go to the Banking menu.
Choose the Banking tab.
Select the blue tile for the account you want to upload the transactions into.
Click the Update drop-down arrow, then select File upload.
Select Browse, then select the file you downloaded from your bank.
Select the account from the QuickBooks account drop-down menu, then select Next.
Follow the onscreen instructions.
Click Let's go to add the transactions to your account.
After the process, you can go back to the Banking menu to categorise and add the transactions. You can refer to this article for the detailed steps: Match and categorise bank transactions in QuickBooks Online. It also contains information on how you can exclude your personal and duplicate transactions.
Moreover, I'd also recommend reconciling your account every month. This will ensure your books are accurate. To learn more, kindly check out this article: Reconcile an account.
Please let me know if you have other concerns. I'm just around to help.