If you want to get started with hardware programming, I would suggest starting with Arduino. It was the easiest starting point for me. Arduino comes in many shapes and flavours for various kinds of projects. Think about robotics, home automations, GPS tracking units etc.
You essentially program the boards in C/CPP via a USB interface. If you want to get started with C programming I would highly recommend the book called “Let us C” by Yashavant Kanetkar. The Arduino starter kit for developers is a great starting point as it teaches you what you need to know to build great stuff. You get to build 15 small projects.
The first “real world” project I created was a gate controller. You scan an RFID tag, the tag id is sent to an online API, the API request authorisation for the tag id and sends a response back. Based on the response that is received from the API, the connected gate is opened. It is quite fun playing with small projects like this.