Optimization of the project structure

Actually only code is placed in assemblies. You can however subdivide your code into several assemblies if that would make sense in your project.

This is what Assembly Definition is for. You create it in a folder and from then on every script in that folder and all its subfolders will be part of that separate assembly (unless a sub folder contains another Assembly Definition in which case that part of the hierarchy will become another .dll)

The cause of long pauses after every code modification is a long standing problem with newer versions of Unity (I think 2020+). It is discussed at length here:

Unity Forum

Splitting your code into assemblies may not necessarily help at all! Unless you have large chunks of code that you hardly ever change.