Algorithm to find the closest possible value among several combinations
This is a common problem so there certainly exist many approaches to solve it. Below I'll sketch such an approach. It probably has a name but I don't know it:

The approach essentially sets up an array of target order sizes with an array length of actual order size + largest available package size. In each array element we store the ID of the package that can be used to increase the overall combined package size from a known solution for some smaller order size to get to the order size related to the index of the array. When we filled up the array we can go back from a realizable solution to an order size of 0 by collecting all the packages that lead to the respective solution. So this will be some kind of a dynamic programming approach.

We start at an order size of 0, go through all available packages and set the array index given by the respective package size to the ID of the package. Now we repeatedly increase the order size by 1 up to the target order size and for each order size we do the following:

If there is an ID of a package in the respective array element we again go through all available packages and store their ID in the array element "order size + package size" if that array element does not yet contain an ID. Otherwise we do nothing and just go on.

When we filled up the array in this way we can search in the neighborhood of the target order size for the array element that best fulfills our needs and also contains a package ID. From there we add the stored package ID to our solution and go back in the array by the size of that package. We do this repeatedly until we are back at a test order size of 0.

Of course, the solution we obtained in this way is not necessarily unique. We can prioritize certain packages by the order in which we process them when filling up the array.