You cannot upgrade either RAM (memory) or storage space (hard drive/SSD size).
FWIW, if you only have 4 GB of RAM, that would be barely enough; the recommendation is a minimum of 8 GB. And, the requirements for Big Sur show that your model is dead last (oldest) for the OS; that means it will run, but not efficiently. Apple tests these requirement under ideal lab conditions, so for the real usage, it is barely enough.
If you do decide to get a newer one, make sure you have at least 8 B RAM (16 would be better) and an absolute minimum of 256 GB (512 is much better) of storage/drive size.