Norway isn't exactly famous for fabulous food, though Rick has indicated the situation is considerably better now than it was 20 or 30 years ago, thanks to immigration. I want to pass along a comment he made somewhere along the way (probably in the Scandinavia guidebook): Norwegian restaurants are expensive, but going to a somewhat more expensive place will often get you a substantially better meal. I think the deal is that Norwegian labor costs are very, very high, so the first $30+ dollars of your cost just gets the employees in the door.
Flam has very few food options. I didn't eat in any of them, but others have reported doing so on this forum. If you don't get responses from those folks in a day or two, use the Search function for Flam and comments will pop up. I would definitely recommend a reservation.
I tried the Pingvinen in Bergen, a rather inexpensive place recommended here and I think also in Rick's book. I found the menu small and uninteresting and the food just OK. The main thing it had going for it, I thought, was that it didn't break the bank. If I'm going to take time away from sightseeing to sit down in a restaurant, I want something a bit better than "OK", but philosophies vary on that topic. And of course plenty of others might find the menu exciting.
I had two nice, casual lunches in Bergen at the little cafe in one of the KODE (art museum) buildings. There was a little sandwich board set out on the sidewalk to flag the location. The menu was small, but it appealed to me. I think I had the fish soup the first day and chose the daily special (another fish dish) the second day. The cost was very reasonable, and it was convenient because I was at the museum already.
If you want something really memorable at a place you'd be proud to recommend to your friends, you may need to budget $45 and up, and you won't get as much for that outlay in Norway as you would in many other countries.
Several times I enjoyed Toast Skagen at midday when I wanted real food that didn't take too long. I think Badger has reported this is a Swedish dish, but it shows up in Norway, too. It's an open-face sandwich piled high with shrimp salad. You need to like dill. Toast Skagen was a filling meal for around $10-$11 in 2022. Norway has good, sturdy bread, so don't worry about choosing Toast Skagen at a little cafe that has the sandwiches already prepared in a cold case.
Incidentally, I believe alcohol is very expensive in Norwegian restaurants, so that's something to be careful about if cost is an issue.