Twice in comics, once in cartoon; but not in the "main" set of events.
Have Cap and Magneto met? Yes and no. (occurences are ordered by date of publication)
Yes, because in What if? #28 (1991), Captain America and fellow soldiers encounter a young "Magnus" in a concentration camp. No, because... it's a What if?, so the story isn't exactly canon, and in that timeline, "Magnus" never became Magneto, thanks to the life lesson Cap gave him about not dividing people based on their differences.
X-Men: Evolution season 2, episode 11 had a different take on that, with Cap (and Wolverine) rescuing Magneto, but presumably no time for the life lesson; hence, him becoming who he was in the TV show.
X-Men: Grand Design #1 (2017) has a Watcher recording some events about "a pantheon of mutants". We see an alternate Earth where, possibly influenced by the
Evolution line-up, Wolverine and Captain America are on a cover mission, and witness a kid being beaten up. Kid turns out to be Magneto, and he uses his powers on Cap's shield to get rid of his bullies.