Operating systems such as macOS do not tend to fragment mechanical disks as much, so they do not need to defragment hard drives either.