To learn how to build your own Linux distribution (or even a single installation) directly from the sources, go read
Linux From Scratch.
OpenWRT is widely used on network appliances, like routers and such. You can get a cheap
compatible device, install OpenWRT on it, and start exploring how it works, is maintained, and is put together.
On anything that has at least 512 MiB of RAM or more, you can install a minimal Debian (
armel/armhf/arm64), and treat as a fully fledged but memory-limited Linux installation. (There is also related
Devuan/Dev1 forum for SystemD-free Debian derivative/fork on ARM architectures.)
In general terms, working on Embedded Linux systems is mostly software integration work, because even embedded Linux systems look and feel like desktop, server, or laptop Linux systems. The software components, from the init system to userspace applications and servers, just matter a LOT MORE than in desktop systems, because of the use constrains.
(As an example, you probably have seen all sorts of
blue screen error messages in public displays. This is a sign of bad integration work; of a poor embedded system integration, choosing software components that require user interaction.)
There are tools that let even a drunk monkey (eventually) set up a seemingly working Linux installation on an embedded system. Many e.g. router manufacturers hire quick teams to derive one from a snapshot of OpenWRT or similar, maybe provide updates for a year or so, and then end the support, leaving the users with the perfectly working hardware no option but buy a new device. This is a working business practice, similar to planned obsolescense, and very cheap, too. It is healthy to dislike such practices. Don't become one of the people who do that. At minimum, let the users maintain the device on their own after official support has ended, because after all, you yourself are relying on the open source efforts of thousands of Linux developers to make your product in the first place.
If things like long boot times are an issue, you will have to either find or develop yourself alternatives to the most common init system in Linux (systemd) and its "associated" services. They are not really suitable for use in embedded systems, even though some do choose to use them (especially when the device has more than half a gigabyte of RAM, and therefore can be treated like a desktop machine from the systems integration point of view).
It is not difficult to construct a completely new Linux distribution or a single system from sources, but the actual number of software components needed and used when even a simple system is running, will surprise you: there are a
lot of details. Don't let that discourage you, because they are just that, components.