Neither, really. More RAM helps somewhat if you’re running many things simultaneously, but it’s more about capacity than speed. More storage just means you can store more files.
If you want faster, get a Mac with a more powerful processor. The 13” with 4 TB ports has a more powerful processor than the one with 2 TB ports (the former is a 10th gen 2 GHz i5, the latter is an 8th gen 1.4 GHz i5). The 2 TB port model can be upgraded to an 8th gen 1.7 GHz i7, the 4 TB port model can be bumped to a 10th gen 2.3 GHz i7, which is the best processor you can get in a 13” MBP.