SD begin affecting OLED display Okay, I'm using u8g2 library for my OLED display. After calling SD.begin(4) function, I cannot display anything on my OLED.

I'm using U8G2_SH1106_128X64_NONAME_F_HW_I2C u8g2(U8G2_R0, /* reset=*/ U8X8_PIN_NONE); constructor from u8g2 library since I'm using I²C for the display and SPI for microSD reader. I removed the CS Pin 4 from SD.begin() and I can now display something on the OLED.

How did supplying CS Pin parameter to SD.begin() function affected the I²C OLED display?
Pins 4 and 5 are the I2C pins that belong to the built in I2C peripheral on the Arduino. You have to put your CS line for the SPI SD card on a different pin. 

EDIT:
The answer above is relevant to the Arduino ATMega328-based board, not ESP8266-based NodeMCU board. This answer is not relevant to ESP8266 or NodeMCU with regard to hardware I2C, as the ESP8266 does not have a dedicated hardware I2C peripheral.