Choose style for content element

i use bootstrap package and i need to implement style choosing in backend for element. i think the better way is add extra container where class name depends on combobox in backend but i new in typo3 and i cant find good guides for creating typo3 extension with similar fuctions(adding extra field to backend). can anyone guide me in creating this extension or give step by step instruction

I think you only need changes done in a site-extension, which should be available anyway.

If you want to enable editors to select a special layout for CE (content element) you can use the given fields. CEs are stored in tt_content records, where you have the fields layout and frame_class. These are used for specifying layout since the beginning.
You only need to add options to the selects, though the editors can choose from.
And of course an interpretation, so the rendering will change. either with additional CSS-classes or with another HTML mark-up.
The additional options can be added with page TSconfig (https://docs.typo3.org/m/typo3/reference-tsconfig/10.4/en-us/PageTsconfig/TceForm.html#additems)
For the rendering you need to copy the templates (or layouts if you want to add the variants to all CEs) and add the different rendering (only CSS classes or completly different rendering).

some complete examples based on Fluid Styled Content (the base of the bootstrap package) only can be found at https://blog.matthaa.de/rahmen-section_frame-frame_class-und-layouts-in-fluidtemplates/ (alas it is in german)