Which Ardudino board to pick

Some time ago I created a clock project that was using DS3231 and OLD SPI display.
The problem I had is that after declaring libraries for bothe RTC and display I was running out of memory.
I completed the project by replacing Arduino nano with Arduino Mega.
I made it work and I left it there.
Now I want to use it in other project and this time Arduino Mega is waaay to large. I have also Arduino Uno, Pro Mini, Attiny etc. But they also have just 2k of SRAM.
I am wondering if there are any arduino compatible boards that, more compact, that I can program from Arduino IDE.
e.g I have WEMOS D1. But will it run Arduino code?
Please Advice

There are tons of board nowadays. Look at the hardware site on arduino.cc. The are boards at Nano size but more powerful.
Even I've never work with Wemos D1, I do not see the problem.

If i can recommend, I would use more modern ESP32 instead of Wemos ESP8266.