first of all I want to thank you in advance for even reading my post and any effort you will put into helping me. I highly appreciate your expertise and time you spend to help me.

Now to the problem:

I discovered OSM on Friday to solve a problem that I have. For a certain area, I want to extract all the street names. Originally, I would just go to Google Maps and click on every street to get the street name, but I think that is very inefficient and I want to make it way easier. When it comes to coding etc, I am a total noob and I don't really know what I am doing.

It is very useful, so far I installed Osmosis and got it running. The country that I want data from is Portugal. I managed to get the street names from a rectangle, however, the areas that I want are more complex like a mulitpolygon.

For that, I downloaded JOSM and its here where the first problem starts. I have no clue if I do it the right way, but I basically downloaded the GPS data from Lisbon. Actually I just needed the satellite map, but I had no idea how to get that on JOSM. Then I drew some nodes of my area and made it into a Multipolygon and saved it as an osm.file. I provide a link so you get the picutre:

Not sure if I am on the right track, but I downloaded Perl and installed it.
In the Command line I put:

"perl PathToOSM2PolyScript PathToMultipolyFile"

The results were correct like the ones in the Question link that I posted, however here is the big problem:
How do I get the results into a .poly file that can be read by Osmosis?
This is where I am stuck.

Additionally, the last thing whats missing is then to filter the .osm file that contains all the data. I figured I can just open the .osm file with Excel and I get so much data, but how to I filter only for the street names?

I saw that in the Answer to the posted Question, the guy provided a line like this:

You guys see, I am not an expert in IT, but its really on my heart now to solve this problem. I tried to go ahead as far as I can all by myself. But now I got to a point where I can't go any further without help. So I am sorry to bother you guys, but please do help me with any solutions or suggestions.

Regarding your first question, how to create the extract you are looking for: You could download the "poly" plugin for JOSM which would allow you to save your polygon directly as a .poly file, no need for osm2poly then, followed by the appropriate osmosis (or osmium-tool) command. OR go the extracts.bbbike.org where you can draw your polygon on the web site and request an extract for exactly that polygon, no further tools needed!

Regarding your second question, how to get all street names in an extract, there are many different ways to do that but since you already have JOSM, you could try to load the file in JOSM, then select everything that has a highway tag and a name tag (the search box is quite informative), and save just the selected objects into a new file (you might need to create a new and empty file and copy over the selection). In the resulting XML file, find all lines that look like

If by "how do I execute the code that you used" you mean "how do I find all lines that look like ... after I have saved all highways to a separate file in JOSM" then the answer is that there are many ways to do it. On Linux I would use the "grep" utility, writing something like

but you could, for example, simply load the file you have saved into a word processor or spreadsheed program and then sort all lines, and identify the block that begins with "<tag k='name'" manually...