All those developers who wrote games with assembly for nintendo and co did that because hardware was very specific, which is why nintendo should have developed their own high-level language compilers, which they clearly cba to do. The development process in which high-level language utilized goes a lot faster than that based on assembly.
At least in the case of the NES and SNES, development in high-level languages is unrealistic, owing to low clock speeds (1.79 MHz and up to 3.58 MHz, respectively), limited register counts (1 general-purpose and 2 index registers), small stack space (256 bytes for the NES, up to 8 KB on the SNES), and in the case of the NES small RAM (only 2 KB) and compiler-unfriendly bankswitching to increase the effective address space.
It's no coincidence that the first console to see significant use of high-level languages was the Sega Genesis, whose 68000 CPU has a much more compiler-friendly architecture. (For example, some Genesis EA sports titles were programmed in Pascal rather than assembly.)
I know a bit of C++ and know about modern engines and libraries and am interested but don't know much of it.
I've noticed that back in the day when assembly was almost the standard for developing games (Nes, Genesis, Snes) that there were barley any shared engines. The only thing I've heard of is that Batman Forever on SNES and Genisis used Mortal Kombat's (Genesis port's) engine, and Super Noah's Ark 3d using Wolf 3d's (Snes port's) engine, but I imagine those games were programmed in C.
It makes me think it was because game engines, libraries, reusable/recyclable functions are not possible in assembly unlike C/C++ etc, but please correct me on whatever I'm wrong on, and if there's such thing as shared engines, libraries etc in assembly some examples or mentions would be nice.
What you're seeing is largely due to the fact that the idea of a "game engine" is relatively new in terms of game development - in the era when games were predominantly programmed using assembly, people didn't really talk about "engines" per se.
Part of this is that people didn't really talk much about "engines" before the era of 3D games and especially before the 21st century, where the sheer amount of code that can be reused from game to game increases drastically (due to 3D graphics being far more code-intensive than 2D graphics) coincidentally more general-purpose solutions become feasible (due to increased RAM and more powerful processors). Another part of it is that what we now call using an engine was just called code reuse back then, and was as a rule done in-house rather than with engines licensed from 3rd parties.
But make no mistake, large amounts of code were reused. For example, Square released 3 Final Fantasy games on the Famicom in Japan, and all three share significant amounts of code*. Square's SNES RPGs also have a lot of code in common. Super Mario Bros, Metroid, and Kid Icarus share code. Most Capcom-made NES games are built on one of two code bases depending on when they were developed.
As a general rule, any game made in the 8- and 16- bit eras will share a decent amount of code with other games from the same developer on the same platform (Batman Forever on SNES and Genesis and the Genesis port of Mortal Kombat II, which you mentioned, were developed by the same studio, Probe Entertainment), and this trend increases in the early 3D era up to the modern day where many games are built upon large collections of general-purpose code - which we now call "game engines" - that are often licensed from other developers (much like Wisdom Tree licensed the Wolfenstein 3D SNES code from id software to make Super Noah's Ark 3D).
* This includes, for the first two, segments of code that serve only as placeholders for English-language ports - one of which never got made. The NES port of Final Fantasy uses different bankswitching hardware than the Famicom original. The Famicom games have code that does nothing in the Famicom version, but can be easily changed into code that controls the bankswitching hardware used in the NES version of Final Fantasy without changing code size or performance.