You have two problems. First, by making the year a factor, you're implicitly saying it's a discrete variable, so there will be no lines between years. Second, even if you remove factor, you still have several y for each x, that makes strange vertical lines (since geom_line() will try to make a line between each consecutive point). So in this case you can first summarize and plot the line only for the mean (for example).
Thank you for your answer. As i said, i am looking to draw a line for each country, so i can compare their evolution each year, so i would have three lines
Oh right, then you just need to have the group inside the aes(), since you want to map it to a variable.
Also, there is a smal problem with your example data, where you have 1 country per year, which is probably not true.
example <- data.frame(country=c("Argentina","Uruguay","Brazil","Argentina","Uruguay","Brazil","Argentina","Uruguay","Brazil"),
year=c(2018,2018,2018,2019,2019,2019,2020,2020,2020),
value=c(10,12,13,12,14,17,13,13,20))
ggplot(example,aes(year,value,group=country)) + geom_line()
#same with color
ggplot(example,aes(x=year,y=value, color = country)) + geom_line()