i don't understand why this doesn't work

basically nothing happens when i press space…

using System.Collections;
using System.Collections.Generic;
using UnityEngine;

public class code : MonoBehaviour {

void Start () 
{
GameObject camera = GameObject.Find ("Main Camera");
var videoPlayer = camera.AddComponent<UnityEngine.Video.VideoPlayer> ();
videoPlayer.renderMode = UnityEngine.Video.VideoRenderMode.CameraFarPlane;
videoPlayer.url = "C:\\Users\\msi\\Desktop\\Finalmajor\\FinalStuff\\FinalStuff\\4x4\\Start.mp4";
videoPlayer.isLooping = true;
}
IEnumerator TimerRoutine() {
	
	if (Input.GetKeyDown ("space")) {
		var chose = Random.Range (0, 3);
		if (chose == (1)) {
			{
				GameObject camera = GameObject.Find ("Main Camera");
				var videoPlayer = camera.AddComponent<UnityEngine.Video.VideoPlayer> ();
				videoPlayer.renderMode = UnityEngine.Video.VideoRenderMode.CameraFarPlane;
				videoPlayer.url = "C:\\Users\\msi\\Desktop\\Finalmajor\\FinalStuff\\FinalStuff\\4x4\\1st animation.mp4";
				yield return new WaitForSeconds (40);
				videoPlayer.url = "C:\\Users\\msi\\Desktop\\Finalmajor\\FinalStuff\\FinalStuff\\4x4\\Start.mp4";
				videoPlayer.isLooping = true;
		}
	}

		if (chose == (2)) {
				GameObject camera = GameObject.Find ("Main Camera");
				var videoPlayer = camera.AddComponent<UnityEngine.Video.VideoPlayer> ();
				videoPlayer.renderMode = UnityEngine.Video.VideoRenderMode.CameraFarPlane;
				videoPlayer.url = "C:\\Users\\msi\\Desktop\\Finalmajor\\FinalStuff\\FinalStuff\\4x4\\2nd animation.mp4";
				yield return new WaitForSeconds (40);
				videoPlayer.url = "C:\\Users\\msi\\Desktop\\Finalmajor\\FinalStuff\\FinalStuff\\4x4\\Start.mp4";
				videoPlayer.isLooping = true;
		}
	}
}

}

For starters you never start the coroutine so the code inside it never gets executed. To do so Use->

StartCoroutine(TimerRoutine());

inside void Start().
After that the corourine will get executed once thus it will still be useless. You need to make it run in a loop (infinite or not) so change it to →

IEnumerator TimerRoutine() {
     while(true) // you may add logic to the while to stop the coroutine under certain event
{
     if (Input.GetKeyDown (KeyCode.Space)) {
         //your code
     }
yield return null;         //this is crucial if you don't use it Unity will crash
}
 }

Cheers.