So I've been watching some commie youtube videos on the history of Korea and the way it's portrayed in those is that Kim Il-Sung and friends fought to kick out the japanese, and when Japan surrendered at the end of WW2, the People's Republic of Korea was established and Kim Il-Sung was elected. A few months later the United States invaded and established the United States Army Military Government in Korea in the south, and the USSR sent troops to the north.
I tried to find more info on this but after a quick google search, most websites I find completely ignore the existance of the People's Republic of Korea and act as if the split between North and South came immediately after Japan surrendered.
Is the first portayal of events any accurate? If not, what does it get wrong?
Also, to what degree was Kim Il-Sung elected, and did he have any popular support in Korea? Or was he just a puppet chosen by Stalin?
If I understand your question correctly, you mean the temporary government that formed under Yo Un-hyong (Lyuh Woon-hyung in your wikipedia link - welcome to romanisation of korean, a troublesome topic if ever there was one). This is more often known known as the KPR (Korean People's Republic).
As a side note, this period in korean history between the end of WW2 and the korean war is a tricky one because it's not truly in the past, i.e. objectivity is not guaranteed. Personally it's one I believe you need to delve into works specialising on the time in order to get a proper understanding because this is a period that tends to suffer from severe glossing over.
First and foremost, the Korean Provisional Government (aka KPG) that was formally founded in Shanghai in 1919 and led by Kim Koo at the end of WW2 is not the same as the KPR. The KPG or members thereof did not set foot in korea until the US military government (USAMGIK) was already well in place and indeed did so with the permission of Hodge (commander of USAMGIK). They are effectively irrelevant to the period between the formal japanese surrender and the arrival of USAMGIK.
Regarding the creation of the KPR in the south, I wrote a background on this period in a previous post that I'll refer you to if you're interested, part 1 and part 2.
The short of it is that korean spontaneously across the country organised themselves into adhoc local governments as soon as the japanese surrender was announced. Basically their purpose was to take over power from the the japanese government aparatus (including removing the hated police), free people the japanese had imprisoned, and keep a form of government running (e.g. adhoc police was formed to keep the peace). The japanese governor general was worried about retaliation against japanese soldiers and civilians and asked Yo to organise a transfer of power and Yo organised these small adhoc local governments under the Committe for the Preparation of Korean Independence (CPKI), which eventually became the KPR. In the south Hodge eventually suppressed them as "communists" (which they were not) in favour of the "conservatives" (what the pro-japanese collaborators had re-badged themselves as).
Kim Il-Sung had no part in this process, indeed it seems that he arrived after the CPKI and the Soviets were already in place.
Thus Kim Il Sung was neither the handpicked puppet of Moscow groomed well in advance of the Soviet occupation, nor was he the heroic leader who fought his way through the remaining Japanese forces to liberate Korea, as DPRK hagioraphy has sought to portray since the beginning of the regime. He was the chosen leader among his guerrilla cohorts, but did not himself engage the Japanese at the end of the war, and his arrival on Soviet transport was almost a fluke. It was a rather innocuous beginning for a man who shortly was to rise to the pinnacle of power in North Korea.
When Kim arrived in his home city, he found Pyongyang with a functioning Soviet administration and a local People's Committee [what the local CPKI became called] dominated by the conservative nationalist Cho Mansik.
pg 55. "The North Korean Revolution, 1945-1950", by Charles Armstrong.
Anything on North Korea is sketchy, simply because it's North Korea, but it doesn't seem to be a stretch to say that Kim Il-Sung wouldn't have become what he did without foreign intervention in the form of the Soviets. Similarly Rhee Seung-Man in the south is highly unlikely to have come to his position if not for Hodge.
Kim Il Sung had nothing to do with the Provisional Government of the Republic of Korea. Kim was a guerrilla fighter who became a member of the Soviet military (a major) and marched into Pyongyang with the Soviets.
The Provisional government was created in 1919 and was based out of Shanghai. Syngman Rhee was the first president of the government (until he was removed for mismanagement) and Kim Gu was the last.
The split did occur immediately at the end of the war, but it was intended to be temporary with the Soviets administering the north, the Americans the south, and a unified government to be created as soon as possible. The Cold War, however, dashed these plans and the UN vote in 1948 was boycotted in the north, so only a government in the south was created. The Soviets then rushed and created the DPRK a month later.
Kim was elected, but he was a puppet. Opponents were forced out of the government, murdered, exiled, and jailed.
I don't know what videos you're watching, but they are all wrong. For more information on Kim, check out Under the Loving Care of the Fatherly Leader. It's a great text on the Kim family (up to Kim Jong-il). For information on the split, any Korean history text will tell you what you want to know. I usually recommend A History of Korea by Michael Seth. It's a general history textbook but it covers the main points.