Hi there,
Yes, it is okay to use a 40-amp circuit breaker. The recommended circuit sizes are 20, 30, 40, and 50 amps, and the wire connection from your home can be 3 or 4-wired. For more information, please refer to the link below and see pages 7-12 for details on the electrical connection.
Installation manual:
https://downloadcenter.samsung.com/content/EM/202004/20200401105114227/Install_NQ5300R_NQ70R5511DG_AA_DG68-01149A-04_EN-MES-CFR.pdf
Have a great day,
-Ernest-