Whether you're learning traditional Irish tunes or classical sonatas, there is a place for learning by ear. If you already read music, learning a tune or piece by ear can seem incredibly difficult in comparison to just reading the notes, if you already know how to read, but the rewards are worth it! You'll start to experience music in a very different way - as if it's coming from inside of you, without the page being between you and the magic.
So, the question is, if you've never done it before, how do you start?
One way is to learn how to match pitch. Ask a friend to choose from two different notes, and your job is to try to play the one that matches theirs. Try notes that are far apart to start, then closer and closer together. The easiest way to do this is with someone who plays the same instrument; a more challenging version is working with a different instrument. Listen to see if the note is high or low, where you feel it in your ear, and the timbre of the instrument - how does the violin's E string sound compared to the A? On a wooden flute, the C-natural has a very different colour than the C-sharp. On the piano, the higher notes have a less resonant tone compared to the lower pitches.
A second way is to practice relative pitch. Practice feeling how far apart two notes are - if you sing the Jaws theme, you'll hear that the two notes are very close together. Pick a starting note. Can you find note 2? Think about Somewhere Over the Rainbow. Sing the first two notes. Are they close together? Far apart? Do the go low to high, or high to low? Pick a note, then try to find note 2. If you get mixed up, sing it again, then go back to your instrument. Start with very simple tunes you know - a nursery rhyme you learned in elementary school, a carol you've known forever, Baby Shark.... (sorry).
When you feel ready to move on to your Irish tunes or classical pieces, choose something short and simple to try first. Polkas are great because they generally have a lot of repetition and only 4 notes per bar. For classical pieces, a short Baroque dance movement or something from an early method book works well. Find a recording you like - perfect if it's on a solo instrument, even better if it's your instrument! Then put the recording on repeat as you go about your day - listen to it until you can hum it alone, then try it on your instrument. If parts move too quickly for your ear to catch right now, use AnyTune or Audacity or a similar software to slow the track down.
Playing by ear is a skill worth working on; not only is it personally rewarding as you build your repertoire, but you have a much stronger connection with your audience and fellow musicians as you play.
Good luck as you get started!