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

    <schemaVersion>X0508</schemaVersion>

    <documentType>4</documentType>

    <periodOfReport>2025-12-26</periodOfReport>

    <issuer>
        <issuerCik>0001622229</issuerCik>
        <issuerName>Cogent Biosciences, Inc.</issuerName>
        <issuerTradingSymbol>COGT</issuerTradingSymbol>
    </issuer>

    <reportingOwner>
        <reportingOwnerId>
            <rptOwnerCik>0001856514</rptOwnerCik>
            <rptOwnerName>Robinson John Edward</rptOwnerName>
        </reportingOwnerId>
        <reportingOwnerAddress>
            <rptOwnerStreet1>C/O COGENT BIOSCIENCES, INC.</rptOwnerStreet1>
            <rptOwnerStreet2>275 WYMAN STREET, 3RD FLOOR</rptOwnerStreet2>
            <rptOwnerCity>WALTHAM</rptOwnerCity>
            <rptOwnerState>MA</rptOwnerState>
            <rptOwnerZipCode>02451</rptOwnerZipCode>
            <rptOwnerStateDescription></rptOwnerStateDescription>
        </reportingOwnerAddress>
        <reportingOwnerRelationship>
            <isDirector>false</isDirector>
            <isOfficer>true</isOfficer>
            <isTenPercentOwner>false</isTenPercentOwner>
            <isOther>false</isOther>
            <officerTitle>Chief Scientific Officer</officerTitle>
        </reportingOwnerRelationship>
    </reportingOwner>

    <aff10b5One>false</aff10b5One>

    <nonDerivativeTable>
        <nonDerivativeTransaction>
            <securityTitle>
                <value>Common Stock</value>
            </securityTitle>
            <transactionDate>
                <value>2025-12-26</value>
            </transactionDate>
            <transactionCoding>
                <transactionFormType>4</transactionFormType>
                <transactionCode>S</transactionCode>
                <equitySwapInvolved>false</equitySwapInvolved>
            </transactionCoding>
            <transactionAmounts>
                <transactionShares>
                    <value>90000</value>
                </transactionShares>
                <transactionPricePerShare>
                    <value>38.74</value>
                    <footnoteId id="F1"/>
                </transactionPricePerShare>
                <transactionAcquiredDisposedCode>
                    <value>D</value>
                </transactionAcquiredDisposedCode>
            </transactionAmounts>
            <postTransactionAmounts>
                <sharesOwnedFollowingTransaction>
                    <value>140002</value>
                    <footnoteId id="F2"/>
                </sharesOwnedFollowingTransaction>
            </postTransactionAmounts>
            <ownershipNature>
                <directOrIndirectOwnership>
                    <value>D</value>
                </directOrIndirectOwnership>
            </ownershipNature>
        </nonDerivativeTransaction>
    </nonDerivativeTable>

    <footnotes>
        <footnote id="F1">The price reported above is a weighted average price. The shares were sold in multiple transactions at prices ranging from $38.51 to $39.01, inclusive. The Reporting Person undertakes to provide to the Issuer, any security holder of the Issuer, or the staff of the Securities and Exchange Commission, upon request, full information regarding the number of shares sold at each separate price within the range.</footnote>
        <footnote id="F2">Includes previously reported shares of common stock underlying restricted stock units granted to the Reporting Person, which are subject to certain vesting conditions.</footnote>
    </footnotes>

    <ownerSignature>
        <signatureName>/s/ Evan D. Kearns, Attorney-in-Fact</signatureName>
        <signatureDate>2025-12-30</signatureDate>
    </ownerSignature>
</ownershipDocument>
