<center> will act a bit strangely when working with flex properties. It's a kind of tag that is not really needed (nor suggested) when working with certain CSS stylings.
Whenever you want to center a div, I suggest you adding
margin-right: auto; &
margin-left: auto; to its properties.
Since the content you want to center are inside the ".right" div, you can just add these properties to it. That should do it!
.right{
padding: 1rem;
margin-right: auto;
margin-left: auto;
}
If something is not working for you, let me know!