Games support for the PS4 will go till 2021 while technical and warranty support will continue for a few years after that. Meanwhile, the PS5 will come in 2020 and by 2021 will have all of “Sony’s” software focus shifted to it. So Sony will be supporting both PS4 and PS5 with games simultaneously for at least a year. Like they have done with PS1-PS2, PS2-PS3 and PS3-PS4.
People hear the phrase “3 more years” and think that means PS4 is dead in 2021 and PS5 takes its place but they never think of the overlap that Sony always has when releasing platforms.