Least functionality is the practice of enabling only the features, services, ports, components, and capabilities a system actually needs to perform its intended job.
Security by design is the practice of considering security requirements and risks during planning and architecture instead of treating them as afterthoughts.