Exhibit 23.1
CONSENT OF INDEPENDENT REGISTERED PUBLIC ACCOUNTING FIRM
We consent to the incorporation by reference in Registration Statements No. 333-268789, 333-269037, and 333-296315 on Form S-8 of MasterBrand, Inc. of our report dated June 25, 2025, relating to the consolidated financial statements of American Woodmark Corporation as of April 30, 2025 and 2024 and for the three years in the period ended April 30, 2025, appearing in this Current Report on Form 8-K/A of MasterBrand, Inc.


/s/ Ernst & Young LLP

Richmond, Virginia
June 26, 2026