All EU airports have good public transport access, by bus and sometimes train as well, both to the primary city they serve and usually to other locations as well. Ireland
is no different.
The official Dublin Airport (DUB)
website lists all the bus operators which serve the airport. https://www.dublinairport.com/to-from-the-airport/by-bus
Just click on the operator name to go to their website.
As you're staying in central Dublin
one of the two Airlink Express
routes will probably be best:https://airlinkexpress.ie/
You can buy tickets (with a small discount) online in advance or just pay the driver in cash (cards not accepted): 7 euro one-way, 12 euro return (i.e. round-trip). Airport bus services always carry a premium in Europe: local ('ordinary') bus fares are of course much cheaper.