This depends entirely on your budget and gaming goals. Note: the PS4 launched in 2013, so this advice is retrospective but useful for understanding generational transitions.
Modern Context: Today, the PS5 is the current generation. If buying now, a used PS4 is the sweet spot for value/library, while a PS5 offers cutting-edge performance.