Earlier quoted context omitted.
Apple's walled gardens don't solve the maleware problem. People get code Apple doesn't approve of onto their platforms all the time. What these things do make more difficult is community maintained software, which is what made the platforms you feel nostalgic about so nice.
Yeah let us stop using Anti virus software on PC because it doesn’t stop every virus. It is never about elimination but minimization. Reality is that macOS and iOS both have much smaller malware problem than competing platforms.
There's also a serious cost to the walled gardens. These things eliminate community maintained software which results in everything on your computer being controlled by a profit (often marketing) driven corporation. These always eventually die (taking your data with them) or abuse their special position of power.