I've recently transitioned into a new work from home job. I've never done remote work before, so during my interviews I asked friends who worked from home what they did to maintain a good work-ethic. This is a small mixture of what they said as well as some findings of my own.
Create a space
You might like sitting on your bed or couch with a lap tray, but that isn't going to cut it. Not only would that end up being bad posture, but your main activities for those spaces are anything but working. Your state of mind has a huge part to play in doing work effectively and your space will be a great contributor to that mindset. You want to have a room or area of your house dedicated to working. A room is a good choice, especially if you have small kids. Otherwise, pick an area near a window (gimme that vitamin d) to put a desk or table with some knick knacks. Preferably away from a TV. You want to reduce the amount of distractions as well as potential distractions.
Your space doesn't have to be boring either! Put up some movie or game posters, trick your desk out with RGB lights, put your favorite collection or hobby items within your view. You also want a space that you actually want to sit at for hours every day. There's a balance to strike which means knowing yourself enough to know what will be a distraction and what won't be.
This piece of advice is potentially the most expensive tip here. Your housing situation might not be currently suitable for working from home. You may need to move to a new apartment or house to get the quiet corner that you need to work effectively.
If you've got children, doubly so. In July 2020, my house wasn't setup to work from home with two small kids. The best I could do was put a small desk in the master bedroom which was quite uncomfortable. I sold my home and moved somewhere with an office in mind so I could work from home. I understand not everyone can do this but if you're not in a comfortable space when you're working from home, it won't last long.
Don't wear weekend clothes
A common joke about working from home is the person on video call doesn't have pants on. Which has hilariously been the case many times. However, I've found not wearing proper attire when I work breaks me out of that state of mind that I need. Since 2004, I've always worn jeans or slacks of some kind when I went to work. I tried wearing shorts a few times and I couldn't concentrate. Shorts were a weekend thing, not a work thing. It only took a couple days of wearing shorts for me to take a quick break and change into jeans. I was ready to go right after that.
I needed to remember I'm at work when I'm at this desk, not at "home". Clothing helps my attitude follow that desire, same with brushing your teeth, washing your face, and general hygiene. Just because you don't physically see anyone, doesn't mean you should slack on keeping yourself feeling fresh.
Have a signal for interruptions
If you are living with others, try to create a way for the other members of the household to know if you're interruptible or not. For my wife and kids, if my office door is open it means I can be interrupted. When I go into a meeting or need some concentration time, I close my door. It's simple and works out great for myself.
For a more automated solution, a friend of mine created a Mac app called On Air to adjust LifX and Wyze devices (and soon Philips Hue) to alert his family when his availability changed. Talk with your housemates and come up with a solution that is easy to follow through with.
Don't neglect meaningful interactions
Whether you intend to make friends at work or not, there's people you see everyday that you talk to about work, music, movies, games, etc. When you're working remotely, that interaction is less natural and requires more effort. Talk to people on slack/teams (or whatever your company uses) and get to know people! You don't have to tell your life story but shared hobbies and interests can develop new friendships.
While making friends at work is important to a degree, I'd put more emphasis on maintaining your friends and relationships outside of work. Doing remote work means many of those co-workers you interact with everyday likely don't live anywhere near you. Make a concerted effort to create a group of close friends that you can create some shared experiences with. Your natural outlet for social activity used to be at the office, but now you never technically leave your office. Put in the effort to call some friends and see how they're doing.
This list is definitely not exhaustive. I've only been working from home for a couple months as of this post's date. I'll add to this list as I hear more tips or more findings on my own.