To post codes, there are two options in the bar of the text editor:
Would say a realistic flight simulator is well possible in Unity and sounds like an interesting way to put your knowledge to use too.
Is it the first time you touch any game engine though? In that case in can be a bit rough since that on its own has a learning curve.
The physics system is likely simpler to use than what Matlab Simulink can do however. Don’t expect perfect determinism because game engines are optimized for performance over realism.
By the way, actual code questions rather belong in here:
https://forum.unity.com/forums/scripting.12/
But general questions on algorithms to use may be tolerated here as well like this thread of yours.
It takes a little bit to understand properly what all the force options and methods are that you have with Unity’s Rigidbody component. Use Unity 2022.3 or newer since they added the GetAccumulatedForce/Toqrque methods which can be helpful for debugging physics stuff.
I recommend making a simple test bed where you just try out the methods with simple controls to get familiar with them.
Note that the physics system does have an InertiaTensor you can set: https://docs.unity3d.com/ScriptReference/Rigidbody-inertiaTensor.html
Unity will calculate one on its own using the colliders, but you will likely want to define your own for realism of something complex like a plane.
My experience resumes to a 2D underwater game where water friction plays a role, as well as an old college project trying to have a system that teaches itself flying with wing flaps.
So a few ideas come to mind:
You have two basic options to branch into, if you ask me:
A. Have a virtual physics model of your plane that calculates the forces applied to the plane.
B. Use a highly simplified air-drag model and physically acting flaps, elevators and rudders etc. on the plane.
In case of A, your plane in Unity is, as far as physics are concerned, just one single game object with a rigidbody component. That one allows you to apply forces to it. Your algorithm needs to determine what torque and forces would be applied when the player turns the yoke or applies other controls.
This means you model the whole physics yourself except for the basic inertia model of the rigidbody. Advantage of this is that this is likely way easier parametrizable, but realism may be harder to achieve and you need to redo much of the parametrization on every plane that is vastly different.
For B. I’d suggest that you model the plane in such a way that all aerodynamically movable parts of the plane are separate objects (without rigidbodies) and child elements of the core rigid body.
The player should then control the real angle of all these objects like they would in a plane.
To actually compute what forces the rigibody needs to receive due to those flaps, you then need to calculate the flap-surface that is relative to the movement direction → What you need is how much air was dispersed in what direction since the last frame. Translate this to a local force on the flap (split very large flaps into multiple) and then transpose that to the force applied to the core rigid body.
This is the technique I used for the wings of my AI project.
That alone does not represent the uplift of the main wings which you would need to simulate separately (including effects like stalling), but it should be sufficiently realistic for the flaps etc. and ideally this should transfer smoothly between different plane sizes and shapes to allow you to design the plane physics visually instead of purely setting numeric parameters.
Naturally this also ignores effects like drag from air vortices, but going this far with realism will stretch your project quite far. Get the plane flying without that first 
Alternative B.b: Give the flaps their own rigidbodies (without being child objects of the core!!) and connect them all via joints to the core. This is cool for a game as it’d allow obstacles to hit the wings and stuff like that, but I fear this can become unstable if you add as many flaps as a large plane has (joints can be a pain in that regard).
P.s. to make a cockpit you can use a technique called camera stacking.
By the way, hope this is not demotivating, but there are at least two solid seeming assets that go in this direction:
https://assetstore.unity.com/packages/tools/physics/aerodynamic-objects-core-251378
https://assetstore.unity.com/packages/tools/physics/aeroflow-physical-aerodynamics-241835 [Note that this one does not seem to include the source code!]