The problem is that Unity is a game engine, not a game framework. That means that any code you do will be following their architecture and using their features. The game logic gets really tight to the engine.
...unless you are Brian Bucklew https://threadreaderapp.com/thread/1703163364229161236.html
Note: That is not the "normal" way to use a game engine.