display: flex;
justify-content: center; /* Horizontal centering */
align-items: center; /* Vertical centering */

ou

display: grid;
justify-items: center; /* Horizontal centering */
align-items: center; /* Vertical centering */