Paul didn’t keep the Sabbath (in the Jewish ritualistic sense) but rather “his custom” was to “reason” (explain) the Scriptures to the Jews who were attending the Synagogue on this Sabbath day.
“Every Sabbath he reasoned in the synagogue, trying to persuade Jews and Greeks.” (Acts 18:4)
Note that the verse above also tells us that Paul “reasoned” with the “Greeks” too on a “Sabbath” day.
It doesn’t say that Paul observed any ritualistic or religious Sabbath day acts and nor does it say that Paul was sitting listening to the sermon by priests on this day.
In fact, Paul’s reasoning is against the “priest’s interpretation” of these same set of Holy Scriptures, i.e. Paul’s reasoning are more than often against the Sabbath day sermons of these ‘ordained priests’.
Note that the Greeks don’t keep the Sabbath nor do they attend the synagogue to keep the Sabbath either. So, certainly it’s “not” the Sabbath-Synagogue-attendance which is meant in these verses.
Here’s another verse explaining this ‘same’ thing:
“As was his custom, Paul went into the synagogue, and on three Sabbath days he reasoned with them from the Scriptures,
explaining and proving that the Messiah had to suffer and rise from the dead. “This Jesus I am proclaiming to you is the Messiah,” he said.” (Acts 17:2 – 3)
So the “act of reasoning on the Sabbath day” is the subject of these verses and “not” the “Sabbath-day-synagogue attendance” which is meant here.
Some Christians have falsely used Acts 17:2 & Acts 18:4 to prove “Sabbath-day-church-attendance doctrine” on Sundays which is “not” what these verses are teaching nor talking about.
Be careful, all of us have to answer the Almighty especially if we handle His Word falsely (learn this):
“‘How can you say, “We are wise, for we have the law of the LORD,” when actually the lying pen of the scribes has handled it falsely?” (Jeremiah 8:8)