You can get free gems in Cookie Run: Kingdom 2023 by availing free codes. However, as of now, no active codes are available for the game.