I want to filter out an instrument, and I have a sample of that instrument. Is it possible to use that sample to filter out an instrument?
Not in Audacity, nor any other DAW I know of.
Spleeter is your best bet: it uses AI,
see … https://youtu.be/IHSGrGXp_oo
Spectralayers Pro can Unmix Stems and does a pretty accurate job. The “other” category is a catch-all for what doesn’t get split out in Vocal, Piano, Drums, or Bass.
…is only ~$300, (Spleeter is free).