If you are looking for accommodation in the city, I recommend that you choose the Canal area or as close as possible to Piazza Unita because you will have almost all the points of interest in the city within walking distance.
As to restaurants: Although almost at the border, we are in Italy. I did not stop eating pasta and pizza all weekend. It's not a myth: these guys are the best at making their typical food.
A good restaurant near the canal is To the Barattolo, in Piazza San Antonio Nuovo. There we had dinner the first night and its pasta is exquisite for a fairly cheap price, although you can really have dinner, eat or drink a good portion of Taglio Pizza in many of the streets near the center, all at a good price and great. For dessert nothing better than tiramisu or one of the magnificent ice cream of the multiple ice cream shops that dot the streets.
Being a port city, it also has a good repertoire of fish dishes from the Adriatic. Most of the restaurants that offer them are located right in front of the harbor promenade.
For coffee lovers there are several good coffee shops with terracita looking at the port, the canal or the same Piazza that served as inspiration for the famous Irish writer James Joyce, which lived a long season in the city and its passage is remembered with several statues dedicated to him.
Undoubtedly, Trieste is a good place to rest in the sun, stroll through its beautiful streets and fill the stomach with good food.