The focal length determines your angle of view, i.e. the field of view that your lens images on the sensor. Or to put it more simply, the focal length determines how large your subject is represented in the image. It is given in millimeters and the larger the focal length, the larger your subject will be displayed in the image (at the same distance to the subject). This is easier to understand with the help of the following sketch.
However, even with the same focal length you can get different results, at least as far as the angle of view is concerned, because it is influenced by the focal length and the sensor size. The sensor is a fixed component of the camera, the size of which is fixed in a specific camera model. For the angle of view, the following applies (for the same focal length): the smaller the sensor, the smaller the angle of view (i.e. the larger your subject is displayed). In order to be able to compare the angle of view of camera and focal length combinations with each other, the crop factor has been invented. This is used when you want to shoot the same angle of view with two different sized sensors. You multiply the crop factor by the focal length and calculate the comparison focal length that would have the same angle of view on a full-frame camera.
For practical use, keep the following in mind: For example, if you want to photograph wild animals that you can't get close to, it makes sense to use a long focal length and a camera with a small sensor. The opposite is true if you want to photograph landscapes or architecture with a wide angle of view. Here you use a camera with a large sensor and a lens with a small focal length.
With this knowledge you can plan your photos even more targeted and understand why certain thing sometimes may not work as you imagine.
If you have any questions, feel free to post them in the comments.
Have a great day,