Older 21.5 inch models have ram slots so the RAM can be upgraded by a service engineer. Later models don't: all the RAM is soldered to the motherboard and can only be upgraded prior to purchase. Look for your model here:
https://everymac.com/systems/apple/imac/index-imac.html
As to taking it apart, it's very difficult to do, and not encouraged for users. I don't know whether any instructions are available but it involves removing the screen. You'd need to be very confident in your abilities.
And remember:
- You have to be able to put it back together, and that's not easy either.
- Apple won't help you if you muck it up.