<?xml version="1.0"?>
<ownershipDocument>

    <schemaVersion>X0206</schemaVersion>

    <documentType>3/A</documentType>

    <periodOfReport>2024-02-20</periodOfReport>

    <dateOfOriginalSubmission>2024-02-21</dateOfOriginalSubmission>

    <noSecuritiesOwned>1</noSecuritiesOwned>

    <issuer>
        <issuerCik>0001633931</issuerCik>
        <issuerName>TopBuild Corp</issuerName>
        <issuerTradingSymbol>BLD</issuerTradingSymbol>
    </issuer>

    <reportingOwner>
        <reportingOwnerId>
            <rptOwnerCik>0001757224</rptOwnerCik>
            <rptOwnerName>OTERO MADELINE</rptOwnerName>
        </reportingOwnerId>
        <reportingOwnerAddress>
            <rptOwnerStreet1>C/O TOPBUILD CORP.</rptOwnerStreet1>
            <rptOwnerStreet2>475 NORTH WILLIAMSON BOULEVARD</rptOwnerStreet2>
            <rptOwnerCity>DAYTONA BEACH</rptOwnerCity>
            <rptOwnerState>FL</rptOwnerState>
            <rptOwnerZipCode>32114</rptOwnerZipCode>
            <rptOwnerStateDescription></rptOwnerStateDescription>
        </reportingOwnerAddress>
        <reportingOwnerRelationship>
            <isDirector>0</isDirector>
            <isOfficer>1</isOfficer>
            <isTenPercentOwner>0</isTenPercentOwner>
            <isOther>0</isOther>
            <officerTitle>Vice President and CAO</officerTitle>
        </reportingOwnerRelationship>
    </reportingOwner>

    <remarks>Remark: No changes from the original Form 3. The current Power of Attorney is attached as an exhibit hereto.

Exhibit List: Exhibit 24.1 - Power of Attorney</remarks>

    <ownerSignature>
        <signatureName>/s/ Luis F. Machado, Attorney-in-Fact</signatureName>
        <signatureDate>2024-02-22</signatureDate>
    </ownerSignature>
</ownershipDocument>
