Trying to upgrade RAM in a 2017 21.5 inch iMac requires a near complete gutting of the computer, and we are a bit weary of seeing reports like "My iMac died after I tried to add RAM."
Apple did not design that model to have its RAM upgraded at home, and even some Apple Authorized Service Providers I've chatted up say they will not attempt the work in their shops. Takes too much labor time and there is a high risk of damaging a customer's computer.
The more important point is that, based on long history here, added RAM will typically NOT make that model feel faster. On you model, about 95+% of "slow" complaints here are traced not to a paucity of RAM but the glacially slow laptop-class mech hard drives Apple fitted to most base-model 21.5-inch iMacs.
However, we can only know if that is your issue if you post more details. If you want a data-driven evaluation in this setting where we can neither see nor touch your computer, please post an EtreCheck report. We can quickly and within the limitations of these forums help you determine what issues are at play without our playing a protracted game of "20 Questions" with you that could go on for days.
EtreCheck Pro is available here:
https://etrecheck.com/index
The free version will do nicely for this purpose, although the app is worthy of our financial support.
We can see hard data about drive performance, software issues and interferences, and RAM usage. Etrecheck is the development of a long-serving and trusted ASC contributor. It is a reporting app, not a "fix-it” app, expressly for displaying information in these forums to help us help you remotely. It will not reveal any personal or secure information.
The benefit for you is the report may show if your situation can be mitigated with and inexpensive external option that does not involve professional help or risking a total teardown.
Please see this excellent user tip on how to post long text reports like EtreCheck's into a forum response:
How to use the Add Text Feature When Post… - Apple Community