Generally, you can see luma theme container’s max-width is: 1280px
So in case, if you wish to change the main container max-width in your theme, Just override _theme.less file in your theme web/css/source/ folder and change max-width in below less variable. You don’t need to disturb any other CSS.
@layout__max-width: 1360px;
Note: I have tried the above solution in Magento 2.3.* and 2.4.* and I have made a custom theme based on the luma theme. It worked for me.
Hope the above solution will also help you in your programming journey.