Trying to connect a 1.3" IIC OLED display to an Arduino M0 board (not Uno)
That header part should look like this (notice the comment starts and ends):

    /*=========================================================================
    SSD1306 Displays
    -----------------------------------------------------------------------
    The driver is used in multiple displays (128x64, 128x32, etc.).
    Select the appropriate display below to create an appropriately
    sized framebuffer, etc.
    SSD1306_128_64  128x64 pixel display
    SSD1306_128_32  128x32 pixel display
    SSD1306_96_16
    -----------------------------------------------------------------------*/
#define SSD1306_128_64
//   #define SSD1306_128_32
//   #define SSD1306_96_16
/*=========================================================================*/


If it compiles but doesn't work try to replace the I2C address of Adafruits 128x64 module (0x3D) by the address often used in Chinese modules (0x3C):

display.begin(SSD1306_SWITCHCAPVCC, 0x3D);


to

display.begin(SSD1306_SWITCHCAPVCC, 0x3C);


If that doesn't work, use an I2C scanner to find the address of the connected module.