Is there an algorithm for selecting best matching data in a data set given a set of parameters? What I am trying to do is for a diet app that I am planning to build. The goal is the users will input their desired macros (carbs, fat, protein) and the system should find all recipes that match the provided macros. It does not have to match it exactly, just the best match.
Another idea is users provide their daily calorie intake and the system will find the best match, regardless of the macros.

Links and study materials are much appreciated.
Assuming you don't have that many recipes, you could just go over all of them and choose the best $k$ (use a heap of size $k$). You should test the naive approach before looking for fancier approaches.

Otherwise, you could use a data structure supporting nearest neighbor search. These are hard to implement, but good implementations should be available in computational geometry libraries.