How to add a new attribute to core wp block editor without npm?

You don’t need block attributes to do that! Core has an alternative that provides a superior experience, block variants.

Block variants let you reuse an existing block, but declare a variant which has predefined block attributes that match your use case.

For example, all embeds are variants of the embed block, even though they have different names titles icons and descriptions.

https://developer.wordpress.org/block-editor/reference-guides/block-api/block-variations/

For example with this:

wp.blocks.registerBlockVariation( 'core/heading', {
    name: 'bracketed-heading',
    title: 'Bracketed Heading',
    attributes: { className: 'heading-with-brackets' },
} );

I got this:

enter image description here

I can add new descriptions, titles, icons, previews, and HTML classes to style the heading differently ( with brackets ). No PHP needed.

The only difference between this and a normal heading, what makes it a bracketed heading is this:

enter image description here