Working from home can certainly be a challenge. I've been working from home for the last 12 years, and over those years, I learned a key to success that has helped me greatly, especially in this time of sheltering at home during the COVID-19 crisis. That key to success is: DISCIPLINE.
I read Jocko Willink's Discipline Equals Freedom, and in that book, he provides thoughts on the topic of discipline that are very insightful. One that caught my eye is on the idea of motivation vs. discipline. He point out that, if we aren't careful, we can put too much stock in being motivated to do work to achieve our goals. Motivation is fickle; it comes and it goes. It is unreliable, and when you are counting on motivation to get your goals accomplished, you will likely fall short. So don't expect to be motivated every day to make things happen. You won't be. Count on discipline instead.