Hello there, markusl!
As someone who's lived in Portland for over 20 years and has done a bunch of touring around these parts, I usually recommend people use transit if they want to get towards the coast. It's not that riding west from downtown (ish) Portland through the westside suburbs is impossible, but it's often not that fun: You'll have to get over the Tualatin Mountains, aka The West Hills, at the very beginning, and they rise suddenly and steeply right outside of downtown. The couple best routes over them are also the ones people drive over, so they are busy. And getting through the westside suburbia is just not that exciting unless you wind through a lot of the quieter streets, which don't make for straightforward navigation. Many of the busier streets have bike facilities, if you want to go that route, but riding on four-to-six lane boulevards, even if there are bike lanes is not my idea of fun. YMMV.
It's pretty easy to take the MAX light rail from central Portland and get off at its western terminus in Hillsboro. That's where you can start my favorite way to get to the North Coast (Astoria to be specific):
https://www.portlandoregon.gov/transportation/36638?a=316549
There's some other good info on biking to the coast here, all starting at the Hatfield station in Hillsboro:
https://www.portlandoregon.gov/transportation/article/301633Also worth noting, if you don't have the time or want to get to the coast faster: There are a few bus options from Portland to the coast, one goes to Astoria and Seaside, another from Portland to Tillamook.
Hope this helps!