Fiction writers (like me) portray a problem and a resolution (good or bad), usually for a main character (MC). In the process, we strive to create emotions in the reader ABOUT that character; so the reader can identify with her, root for her, and celebrate (or grieve) when she wins (or loses).
To the extent we all have our own philosophies of life and what it is about, your MC can have them, and argue them with another character, that argues their own contending philosophy.
So yes, if you want to argue philosophical points, you can. Be aware that what is entertaining in fiction is mostly conflict, as perceived by the reader, which is any time the world or other people is not doing what your MC wants or needs, or your reader knows is not going to end well for a character. To put it simply, people keep reading when they want to know what happens next; i.e. out of anticipation of the unknown.
At times anticipation alone is enough: even the the characters are not conflicted (meaning they are certain in their actions and beliefs and not encountering problems to overcome); the reader may be driven to turn the pages in anticipation of what comes next, especially if the author has given the reader (and not the characters) reason to be much less certain than the characters that their plan would fail miserably.
"Well, that makes it simple!" Julie said. "We must go to Travix first, and find this wizard Zelof there. Right?"
"Absolutely," Karen said, and stood up from the table. "Gather your gear, we've been riding away from it for a week, and must make haste."
Unfortunately for both, they couldn't know Zelof had been dead for days.
So, though Julie and Karen are certain, the reader's anticipation (if the stakes are high enough and this puts their goals in jeopardy) will make them want to read on; to find out what happens when they fail.
But back to philosophy: There are many things that drive characters. Most of these things (love, lust, greed, a desire for safety, success, fame, financial security) are not very philosophical, just emotional. But real people do have philosophies of life that underly some of their decisions, and can conflict with the philosophy of others.
I can write a logical character that does not believe any rapist can be redeemed, and they should all be put to death, and if the State won't do it then by Freya she will.
So yes, some form of [philosophy / religion / beliefs] can drive a character and the plot, a conflicting set of beliefs in another character can drive another character and their opposition.
The First Job of the Writer is to Entertain.
Readers are entertained by wanting to know what happens next. That requires both action (things happening, things being done) and emotional involvement.
A treatise on how you believe the world works and people should behave is not a story; infodumps are not stories, philosophical arguments are not stories. Stories demand a character with a problem they want to solve, and the reader wants them to solve. You can weave a philosophical argument into a story, but (like everything else in the story) you should not do that unless the ramifications of that philosophy actually has consequences for the character and their actions and emotional attachments.
For example, you can tell me Bill is an atheist. But if it doesn't change anything, it (by definition) does not make any difference! Now if Bill is an atheist in love with Karen, but Karen is devout, and he loses Karen when she finds out: Now Bill's atheism has made a difference in his life, and Karen's devotion to her religion has made a difference in hers. Now it matters that Bill is an atheist.
What you write about characters (and to a good extent what you write about physical and cultural setting) should make a difference in the story, it should influence the plot and actions. It is possible to meet that constraint while characters discuss (or contest) various philosophical points.