ATMEGA8 circuit connections, DIP package:
1 - RESET connected via a 10k resistor to the VCC and the ISP programmer
7 - VCC (np +5V)
8 - GND
17 - MOSI to the ISP programmer
18 - MISO to the ISP programmer
19 - SCK to the ISP programmer
20 -VCC (e.g. +5V)
22 - GND
27 - SDA from SDA OLED display
28 - SCK from SCK OLED display

Connection of an OLED LCD, e.g. 128x32 pixels (0.91 inches) or 126x64 (0.96 inches), e.g. SSD1306.
1 - GND
2 - VCC
3 - SCK to SCK microcontroller
4 - SDA to, the SDA microcontroller

The Tiny4kOLED library contains many other functions that can be used. The design with the display is much smaller than when using the Adafruit_SSD1306 library. It allows for use with microcontrollers with less FLASH memory.
Set the microcontroller to 8MHz internal clock (but not necessarily). For ATMEGA8A fuse bits LFuse=E4 HFuse=F9.