NX/DEP has been standard on Linux and Windows since the mid-2000s, which is precisely why ROP emerged as the dominant exploitation technique in the following decade; tools like ROPgadget and ropper exist solely to automate finding the pop-ret gadgets you are studying here. Intel's CET shadow-stack extension was built specifically to close this remaining gap in modern CPUs.