No, the Apple security alert is not real. Apple doesn't really send security warnings, so every instance you see of this on your macOS or iOS device is a scam. Never click on these or call any number associated with the pop-up.